aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorknittl <knittl89@googlemail.com>2010-12-01 14:17:00 +0100
committerJunio C Hamano <gitster@pobox.com>2010-12-01 11:51:59 -0800
commitbd40d252ec1ed2716ac9e6bbeab48b3b40bd0d58 (patch)
treeda03168fe724147e260a91600d65b082dea4f2af /contrib
parentdc91e1b2cbb74797ad60a39d571553f9cd3419f6 (diff)
downloadgit-bd40d252ec1ed2716ac9e6bbeab48b3b40bd0d58.tar.gz
git-bd40d252ec1ed2716ac9e6bbeab48b3b40bd0d58.tar.xz
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 <knittl89+git@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/completion/git-completion.bash2
1 files changed, 1 insertions, 1 deletions
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)..." ||