feat(git): display tag in git-prompt when possible (#11318)

Co-authored-by: Marc Cornellà <hello@mcornella.com>
This commit is contained in:
Banst 2022-11-08 09:34:13 +01:00 committed by GitHub
parent 6df14641ac
commit 6dfc9b960f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,6 +19,7 @@ function git_prompt_info() {
local ref
ref=$(__git_prompt_git symbolic-ref --short HEAD 2> /dev/null) \
|| ref=$(__git_prompt_git describe --tags --exact-match HEAD 2> /dev/null) \
|| ref=$(__git_prompt_git rev-parse --short HEAD 2> /dev/null) \
|| return 0