diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-10-31 13:15:09 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-11-01 10:34:34 -0700 |
commit | 1d517ceab98fd5c3c1a8fb6ef575b44c31ea7a9e (patch) | |
tree | f702131331c063c19d935107ffe69f55e51a142b /t/t4205-log-pretty-formats.sh | |
parent | pretty.c: rework describe options parsing for better extensibility (diff) | |
download | tgif-1d517ceab98fd5c3c1a8fb6ef575b44c31ea7a9e.tar.xz |
pretty: add tag option to %(describe)
The %(describe) placeholder by default, like `git describe`, only
supports annotated tags. However, some people do use lightweight tags
for releases, and would like to describe those anyway. The command line
tool has an option to support this.
Teach the placeholder to support this as well.
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4205-log-pretty-formats.sh')
-rwxr-xr-x | t/t4205-log-pretty-formats.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh index 5865daa8f8..d4acf8882f 100755 --- a/t/t4205-log-pretty-formats.sh +++ b/t/t4205-log-pretty-formats.sh @@ -1002,4 +1002,12 @@ test_expect_success '%(describe:exclude=...) vs git describe --exclude ...' ' test_cmp expect actual ' +test_expect_success '%(describe:tags) vs git describe --tags' ' + test_when_finished "git tag -d tagname" && + git tag tagname && + git describe --tags >expect && + git log -1 --format="%(describe:tags)" >actual && + test_cmp expect actual +' + test_done |