From 233c72eaf7e4b77f62fa857f6f2011dbb60a4040 Mon Sep 17 00:00:00 2001 From: Leonid Volnitsky Date: Sat, 7 Jul 2012 09:22:24 +0300 Subject: do not display "=" before rawhex if there is freshness indicator --- git-prompt.sh | 5 +++-- 1 file 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 -- cgit v1.2.3