From 09f084261302b153e847f775d353e8521fdfe770 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Wed, 19 Aug 2020 14:25:33 +0800 Subject: Improve indicating git status --- gist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gist b/gist index 1eb725e..d95561f 100755 --- a/gist +++ b/gist @@ -282,7 +282,7 @@ _check_repo_status() { # files contents are not the same with the last time called GIST API, so warn user to call 'gist fetch' [[ $(_blob_code "$1") != "$2" ]] 2>/dev/null && local status="\e[31m[outdated]\e[0m" # current HEAD is newer than remote, warn user to call 'git push' - [[ -n $(git cherry) ]] 2>/dev/null && local status="\e[31m[ahead]\e[0m" + [[ -n $(git cherry origin) ]] 2>/dev/null && local status="\e[31m[ahead]\e[0m" echo "$status" fi fi -- cgit v1.2.3-70-g09d2