{"thread":{"id":"12472","subject":"[PATCH 1/3] Don't allow git-describe failures to go unnoticed in t6120","startedAt":"2008-03-04T01:09:31Z","lastAt":"2008-03-04T01:09:31Z","messageCount":1,"participants":["Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"70864","messageId":"20080304010931.GA15791@spearce.org","threadId":"12472","inReplyTo":null,"subject":"[PATCH 1/3] Don't allow git-describe failures to go unnoticed in t6120","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-03-04T01:09:31Z","receivedAt":"2008-03-04T01:09:31Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"If git-describe fails we never execute the test_expect_success,\nso we never actually test for failure.  This is horribly wrong.\nWe need to always run the test case, but the test case is only\nsupposed to succeed if the prior git-describe returned 0.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n t/t6120-describe.sh |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t6120-describe.sh b/t/t6120-describe.sh\nindex a7557bd..ba9ea60 100755\n--- a/t/t6120-describe.sh\n+++ b/t/t6120-describe.sh\n@@ -15,8 +15,10 @@ test_description='test describe\n check_describe () {\n \texpect=\"$1\"\n \tshift\n-\tR=$(git describe \"$@\") &&\n+\tR=$(git describe \"$@\")\n+\tS=$?\n \ttest_expect_success \"describe $*\" '\n+\ttest $S = 0 &&\n \tcase \"$R\" in\n \t$expect)\techo happy ;;\n \t*)\techo \"Oops - $R is not $expect\";\n-- \n1.5.4.3.529.gb25fb\n\n"}]}