diff options
author | Leonid Volnitsky <Leonid@Volnitsky.com> | 2012-07-07 09:22:24 +0300 |
---|---|---|
committer | Leonid Volnitsky <Leonid@Volnitsky.com> | 2012-07-07 09:22:24 +0300 |
commit | 233c72eaf7e4b77f62fa857f6f2011dbb60a4040 (patch) | |
tree | 044a08d1c7c175909f0b7e36c0d9f393e38d11f0 | |
parent | substitute branch name "master" for "M" only if it starts with "master" (diff) | |
download | git-prompt-233c72eaf7e4b77f62fa857f6f2011dbb60a4040.tar.gz git-prompt-233c72eaf7e4b77f62fa857f6f2011dbb60a4040.tar.bz2 git-prompt-233c72eaf7e4b77f62fa857f6f2011dbb60a4040.zip |
do not display "=" before rawhex if there is freshness indicator
-rwxr-xr-x | git-prompt.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/git-prompt.sh b/git-prompt.sh index 2853909..cb3c296 100755 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -425,7 +425,8 @@ parse_git_status() { added_files=() modified_files=() untracked_files=() - freshness="$dim" + [[ $rawhex_len -gt 0 ]] && freshness="$dim=" + unset branch status modified added clean init added mixed untracked op detached # info not in porcelain status @@ -502,7 +503,7 @@ parse_git_status() { if [[ $rawhex_len -gt 0 ]] ; then rawhex=`git rev-parse HEAD 2>/dev/null` rawhex=${rawhex/HEAD/} - rawhex="=$hex_vcs_color${rawhex:0:$rawhex_len}" + rawhex="$hex_vcs_color${rawhex:0:$rawhex_len}" else rawhex="" fi |