{"thread":{"id":"47022","subject":"[PATCH] add a test for \"describe --contains\" with mixed tags","startedAt":"2017-10-24T17:02:59Z","lastAt":"2017-10-24T17:02:59Z","messageCount":1,"participants":["orgads@gmail.com"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"330927","messageId":"20171024170242.31894-1-orgads@gmail.com","threadId":"47022","inReplyTo":null,"subject":"[PATCH] add a test for \"describe --contains\" with mixed tags","fromName":"","fromEmail":"orgads@gmail.com","sentAt":"2017-10-24T17:02:42Z","receivedAt":"2017-10-24T17:02:59Z","isPatch":true,"sender":{"key":"orgads@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1246544?v=4"},"body":"From: Orgad Shaneh <orgads@gmail.com>\n\nIf a repository has early lightweight tags and annotated tags later,\nrunning git describe --contains for an early commit used the annotated\ntag for reference, instead of the lightweight tag which was closer.\n\nThis has been fixed in ef1e74065c19cc427c4a1b322154fd55d7a3588b,\nand regression was tweaked in 5554451de61cb90e530f30b96e62d455e1eff6a1.\n\nAdd a test for that to avoid further regressions.\n\nSigned-off-by: Orgad Shaneh <orgads@gmail.com>\n---\n t/t6120-describe.sh | 16 ++++++++++++++++\n 1 file changed, 16 insertions(+)\n\ndiff --git a/t/t6120-describe.sh b/t/t6120-describe.sh\nindex 1c0e8659d..08427f4b5 100755\n--- a/t/t6120-describe.sh\n+++ b/t/t6120-describe.sh\n@@ -340,4 +340,20 @@ test_expect_success ULIMIT_STACK_SIZE 'describe works in a deep repo' '\n \ttest_cmp expect actual\n '\n \n+test_expect_success 'describe --contains for light before annotated' '\n+\ttest_tick &&\n+\tgit commit --allow-empty -m First &&\n+\ttest_tick &&\n+\tgit commit --allow-empty -m Second &&\n+\ttest_tick &&\n+\tgit commit --allow-empty -m Third &&\n+\ttest_tick &&\n+\tgit tag light-before-annotated HEAD^ &&\n+\ttest_tick &&\n+\tgit tag -a -m annotated annotated-after-light\n+\n+'\n+\n+check_describe light-before-annotated~1 --contains light-before-annotated~1\n+\n test_done\n-- \n2.15.0.rc2\n\n"}]}