Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-12-15 20:39:48 +0300
committerJunio C Hamano <gitster@pobox.com>2021-12-15 20:39:48 +0300
commit6ba65f4ac321d628d754b3e5494a348a2106c03a (patch)
treebb929dece36c58da445cab109b317b9379904e03 /t
parent832ec72c3e15820c3b728b3a56398655d7bb7cb3 (diff)
parenteccd97d0b02a87db0b0e828dd4f0b441c5462a9c (diff)
Merge branch 'es/pretty-describe-more'
Extend "git log --format=%(describe)" placeholder to allow passing selected command-line options to the underlying "git describe" command. * es/pretty-describe-more: pretty: add abbrev option to %(describe) pretty: add tag option to %(describe) pretty.c: rework describe options parsing for better extensibility
Diffstat (limited to 't')
-rwxr-xr-xt/t4205-log-pretty-formats.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh
index 5865daa8f8..35eef4c865 100755
--- a/t/t4205-log-pretty-formats.sh
+++ b/t/t4205-log-pretty-formats.sh
@@ -1002,4 +1002,20 @@ 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_expect_success '%(describe:abbrev=...) vs git describe --abbrev=...' '
+ test_when_finished "git tag -d tagname" &&
+ git tag -a -m tagged tagname &&
+ git describe --abbrev=15 >expect &&
+ git log -1 --format="%(describe:abbrev=15)" >actual &&
+ test_cmp expect actual
+'
+
test_done