1
0
mirror of https://github.com/git/git.git synced 2024-10-20 06:28:20 +02:00

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>
This commit is contained in:
knittl 2010-12-01 14:17:00 +01:00 committed by Junio C Hamano
parent dc91e1b2cb
commit bd40d252ec

@ -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)..." ||