diff options
author | typebrook <typebrook@gmail.com> | 2020-03-16 13:58:39 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2020-03-16 14:00:07 +0800 |
commit | 2d074ee14d4d892c38aff1c88fd6e3d6ca62a7f1 (patch) | |
tree | 991fe9ff748382340c54fd918e7cec832d2ef96e | |
parent | 08975f394c6357d28cad479efa7a95872190ca8a (diff) |
Suppress wrong status message with merged commit
-rwxr-xr-x | gist | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 | } |