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>
knittl committed
Dec 1, 2010 at 14:17 UTC
bd40d252ec1ed2716ac9e6bbeab48b3b40bd0d58
1 file changed
+1
-1
contrib/completion/git-completion.bash
+1
-1
@@ -255,7 +255,7 @@ __git_ps1 ()
255
(describe)
256
git describe HEAD ;;
257
(* | default)
258
- git describe --exact-match HEAD ;;
258
+ git describe --tags --exact-match HEAD ;;
259
esac 2>/dev/null)" ||
260
261
b="$(cut -c1-7 "$g/HEAD" 2>/dev/null)..." ||