diff options
-rwxr-xr-x | gist | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -267,7 +267,7 @@ _check_repo_status() { | |||
267 | else | 267 | else |
268 | cd "$1" || exit 1 | 268 | cd "$1" || exit 1 |
269 | # git status is not clean or working on non-master branch | 269 | # git status is not clean or working on non-master branch |
270 | if [[ -n $(git status --short) || $(cat .git/HEAD) != 'ref: refs/heads/master' ]] &>/dev/null; then | 270 | if [[ -n $(git status --short) || $(git branch) =~ '\* (main|master)' ]] &>/dev/null; then |
271 | echo "\e[36m[working]\e[0m" | 271 | echo "\e[36m[working]\e[0m" |
272 | else | 272 | else |
273 | # files contents are not the same with the last time called GIST API, so warn user to call 'gist fetch' | 273 | # files contents are not the same with the last time called GIST API, so warn user to call 'gist fetch' |