From: knittl Date: Wed, 1 Dec 2010 13:17:00 +0000 (+0100) Subject: bash: Match lightweight tags in prompt X-Git-Tag: v1.7.2.4~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bd40d252ec1ed2716ac9e6bbeab48b3b40bd0d58;p=git.git bash: Match lightweight tags in prompt The bash prompt would display a commit's object name when having checked out a lightweight tag. Provide `--tags` to `git describe` in the completion script, so it will display lightweight tag names, as it already does for annotated tags. Signed-off-by: Daniel Knittl-Frank Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 67569901e..82e660968 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -255,7 +255,7 @@ __git_ps1 () (describe) git describe HEAD ;; (* | default) - git describe --exact-match HEAD ;; + git describe --tags --exact-match HEAD ;; esac 2>/dev/null)" || b="$(cut -c1-7 "$g/HEAD" 2>/dev/null)..." ||