aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHsieh Chin Fan <typebrook@gmail.com>2022-04-18 12:46:33 +0800
committerHsieh Chin Fan <typebrook@gmail.com>2022-04-18 12:46:33 +0800
commit38293318e8c07bf4544cdc83fc2667997499fead (patch)
treebe6668077529b52762e85c5032ec16b4a6275d00
parentc617c0f39912d94015a94b29b787eea639dfe1aa (diff)
Update
-rwxr-xr-xgist2
1 files changed, 1 insertions, 1 deletions
diff --git a/gist b/gist
index 82c390e..a115958 100755
--- a/gist
+++ b/gist
@@ -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'