aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-03-16 13:58:39 +0800
committertypebrook <typebrook@gmail.com>2020-03-16 14:00:07 +0800
commit2d074ee14d4d892c38aff1c88fd6e3d6ca62a7f1 (patch)
tree991fe9ff748382340c54fd918e7cec832d2ef96e
parent08975f394c6357d28cad479efa7a95872190ca8a (diff)
Suppress wrong status message with merged commit
-rwxr-xr-xgist5
1 files changed, 3 insertions, 2 deletions
diff --git a/gist b/gist
index 67925d7..8c0710d 100755
--- a/gist
+++ b/gist
@@ -242,8 +242,9 @@ _check_repo_status() {
242 if [[ -n $(git status --short) || $(git branch | sed -n '/\* / s///p') != 'master' ]] &>/dev/null; then 242 if [[ -n $(git status --short) || $(git branch | sed -n '/\* / s///p') != 'master' ]] &>/dev/null; then
243 echo "\e[36m[working]\e[0m" 243 echo "\e[36m[working]\e[0m"
244 else 244 else
245 [[ $(_blob_code "$1") != "$2" ]] 2>/dev/null && echo "\e[31m[outdated]\e[0m" 245 [[ $(_blob_code "$1") != "$2" ]] 2>/dev/null && local status="\e[31m[outdated]\e[0m"
246 [[ -n $(git cherry) ]] 2>/dev/null && echo "\e[31m[ahead]\e[0m" 246 [[ -n $(git cherry) ]] 2>/dev/null && local status="\e[31m[ahead]\e[0m"
247 echo $status
247 fi 248 fi
248 fi 249 fi
249} 250}