Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jm/free'
[gitweb.git]
/
contrib
/
completion
/
git-completion.bash
diff --git
a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 4ea727b14303e397117067993dbda446ed154ea1..8722a687954ec47a538eff45d41434deedf717fb 100755
(executable)
--- a/
contrib/completion/git-completion.bash
+++ b/
contrib/completion/git-completion.bash
@@
-91,7
+91,10
@@
__git_ps1 ()
fi
if ! b="$(git symbolic-ref HEAD 2>/dev/null)"
then
- b="$(cut -c1-7 $g/HEAD)..."
+ if ! b="$(git describe --exact-match HEAD 2>/dev/null)"
+ then
+ b="$(cut -c1-7 $g/HEAD)..."
+ fi
fi
fi