git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] add a test for "describe --contains" with mixed tags
@ 2017-10-19 19:55 orgads
  0 siblings, 0 replies; 2+ messages in thread
From: orgads @ 2017-10-19 19:55 UTC (permalink / raw)
  To: git; +Cc: Orgad Shaneh

From: Orgad Shaneh <orgads@gmail.com>

---
 t/t6120-describe.sh | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index 1c0e865..08427f4 100755
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
@@ -340,4 +340,20 @@ test_expect_success ULIMIT_STACK_SIZE 'describe works in a deep repo' '
 	test_cmp expect actual
 '
 
+test_expect_success 'describe --contains for light before annotated' '
+	test_tick &&
+	git commit --allow-empty -m First &&
+	test_tick &&
+	git commit --allow-empty -m Second &&
+	test_tick &&
+	git commit --allow-empty -m Third &&
+	test_tick &&
+	git tag light-before-annotated HEAD^ &&
+	test_tick &&
+	git tag -a -m annotated annotated-after-light
+
+'
+
+check_describe light-before-annotated~1 --contains light-before-annotated~1
+
 test_done
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] add a test for "describe --contains" with mixed tags
@ 2017-10-24 17:02 orgads
  0 siblings, 0 replies; 2+ messages in thread
From: orgads @ 2017-10-24 17:02 UTC (permalink / raw)
  To: git; +Cc: Orgad Shaneh

From: Orgad Shaneh <orgads@gmail.com>

If a repository has early lightweight tags and annotated tags later,
running git describe --contains for an early commit used the annotated
tag for reference, instead of the lightweight tag which was closer.

This has been fixed in ef1e74065c19cc427c4a1b322154fd55d7a3588b,
and regression was tweaked in 5554451de61cb90e530f30b96e62d455e1eff6a1.

Add a test for that to avoid further regressions.

Signed-off-by: Orgad Shaneh <orgads@gmail.com>
---
 t/t6120-describe.sh | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/t/t6120-describe.sh b/t/t6120-describe.sh
index 1c0e8659d..08427f4b5 100755
--- a/t/t6120-describe.sh
+++ b/t/t6120-describe.sh
@@ -340,4 +340,20 @@ test_expect_success ULIMIT_STACK_SIZE 'describe works in a deep repo' '
 	test_cmp expect actual
 '
 
+test_expect_success 'describe --contains for light before annotated' '
+	test_tick &&
+	git commit --allow-empty -m First &&
+	test_tick &&
+	git commit --allow-empty -m Second &&
+	test_tick &&
+	git commit --allow-empty -m Third &&
+	test_tick &&
+	git tag light-before-annotated HEAD^ &&
+	test_tick &&
+	git tag -a -m annotated annotated-after-light
+
+'
+
+check_describe light-before-annotated~1 --contains light-before-annotated~1
+
 test_done
-- 
2.15.0.rc2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-24 17:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-19 19:55 [PATCH] add a test for "describe --contains" with mixed tags orgads
  -- strict thread matches above, loose matches on Subject: below --
2017-10-24 17:02 orgads

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).