diff options
author | Hsieh Chin Fan <typebrook@gmail.com> | 2022-04-18 12:46:33 +0800 |
---|---|---|
committer | Hsieh Chin Fan <typebrook@gmail.com> | 2022-04-18 12:46:33 +0800 |
commit | 38293318e8c07bf4544cdc83fc2667997499fead (patch) | |
tree | be6668077529b52762e85c5032ec16b4a6275d00 | |
parent | c617c0f39912d94015a94b29b787eea639dfe1aa (diff) |
Update
-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' |