From 38293318e8c07bf4544cdc83fc2667997499fead Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Mon, 18 Apr 2022 12:46:33 +0800 Subject: Update --- gist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gist b/gist index 82c390e..a115958 100755 --- a/gist +++ b/gist @@ -267,7 +267,7 @@ _check_repo_status() { else cd "$1" || exit 1 # git status is not clean or working on non-master branch - if [[ -n $(git status --short) || $(cat .git/HEAD) != 'ref: refs/heads/master' ]] &>/dev/null; then + if [[ -n $(git status --short) || $(git branch) =~ '\* (main|master)' ]] &>/dev/null; then echo "\e[36m[working]\e[0m" else # files contents are not the same with the last time called GIST API, so warn user to call 'gist fetch' -- cgit v1.2.3-70-g09d2