Skip to content

Commit

Permalink
bash: Match lightweight tags in prompt
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
knittl authored and Junio C Hamano committed Dec 1, 2010
1 parent dc91e1b commit bd40d25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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)..." ||
Expand Down

0 comments on commit bd40d25

Please sign in to comment.