Skip to content

Commit cbfbf44

Browse files
committed
Merge branch 'mg/prompt-describe-tags'
The command line prompt (in contrib/) learned a new 'tag' style that can be specified with GIT_PS1_DESCRIBE_STYLE, to describe a detached HEAD with "git describe --tags". * mg/prompt-describe-tags: git-prompt: add a describe style for any tags
2 parents fc6b5f5 + 9f0b4dd commit cbfbf44

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

contrib/completion/git-prompt.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
# contains relative to newer annotated tag (v1.6.3.2~35)
8383
# branch relative to newer tag or branch (master~4)
8484
# describe relative to older annotated tag (v1.6.3.1-13-gdd42c2f)
85+
# tag relative to any older tag (v1.6.3.1-13-gdd42c2f)
8586
# default exactly matching tag
8687
#
8788
# If you would like a colored hint about the current dirty state, set
@@ -443,6 +444,8 @@ __git_ps1 ()
443444
git describe --contains HEAD ;;
444445
(branch)
445446
git describe --contains --all HEAD ;;
447+
(tag)
448+
git describe --tags HEAD ;;
446449
(describe)
447450
git describe HEAD ;;
448451
(* | default)

0 commit comments

Comments
 (0)