diff options
author | Jesse Luehrs <doy@tozt.net> | 2009-07-11 22:15:17 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2009-07-11 22:15:17 -0500 |
commit | b12eddb4098247fe020b4911d7b47624a0dbcc1d (patch) | |
tree | f2c18bd98acffedb6317b51d41d72784c34509a8 | |
parent | 10b42339d123fb36770684b83f87eb16d8fb5306 (diff) | |
download | conf-b12eddb4098247fe020b4911d7b47624a0dbcc1d.tar.gz conf-b12eddb4098247fe020b4911d7b47624a0dbcc1d.zip |
if we aren't on a head, show the short hash in the prompt
-rw-r--r-- | bashrc | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -210,7 +210,7 @@ function _set_vcs { ;; git) vcs_dirty=$(git status -a > /dev/null 2>&1; echo $?) - vcs_branch=$(git symbolic-ref -q HEAD 2>/dev/null) + vcs_branch=$(git symbolic-ref -q HEAD 2>/dev/null || git show-ref --hash=7 HEAD) vcs_branch=${vcs_branch#refs/heads/} if [[ "x$vcs_branch" == "xmaster" ]]; then vcs_branch='' |