Skip to content

Commit bd40d25

Browse files
knittlgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent dc91e1b commit bd40d25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ __git_ps1 ()
255255
(describe)
256256
git describe HEAD ;;
257257
(* | default)
258-
git describe --exact-match HEAD ;;
258+
git describe --tags --exact-match HEAD ;;
259259
esac 2>/dev/null)" ||
260260

261261
b="$(cut -c1-7 "$g/HEAD" 2>/dev/null)..." ||

0 commit comments

Comments
 (0)