diff options
author | Hsieh Chin Fan <typebrook@gmail.com> | 2020-08-19 14:25:33 +0800 |
---|---|---|
committer | Hsieh Chin Fan <typebrook@gmail.com> | 2020-08-19 14:25:33 +0800 |
commit | 09f084261302b153e847f775d353e8521fdfe770 (patch) | |
tree | eb7e10db5be2b19c663d1f7c2c09a20cbcd4df90 | |
parent | 3b75428f4a1eeadd6b47f777c448d660db8111d1 (diff) |
Improve indicating git status
-rwxr-xr-x | gist | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -282,7 +282,7 @@ _check_repo_status() { | |||
282 | # files contents are not the same with the last time called GIST API, so warn user to call 'gist fetch' | 282 | # files contents are not the same with the last time called GIST API, so warn user to call 'gist fetch' |
283 | [[ $(_blob_code "$1") != "$2" ]] 2>/dev/null && local status="\e[31m[outdated]\e[0m" | 283 | [[ $(_blob_code "$1") != "$2" ]] 2>/dev/null && local status="\e[31m[outdated]\e[0m" |
284 | # current HEAD is newer than remote, warn user to call 'git push' | 284 | # current HEAD is newer than remote, warn user to call 'git push' |
285 | [[ -n $(git cherry) ]] 2>/dev/null && local status="\e[31m[ahead]\e[0m" | 285 | [[ -n $(git cherry origin) ]] 2>/dev/null && local status="\e[31m[ahead]\e[0m" |
286 | echo "$status" | 286 | echo "$status" |
287 | fi | 287 | fi |
288 | fi | 288 | fi |