{"thread":{"id":"49449","subject":"[PATCH] t1400: drop debug `echo` to actually execute `test`","startedAt":"2018-09-28T15:44:14Z","lastAt":"2018-09-29T08:00:20Z","messageCount":2,"participants":["Martin Ågren","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"359207","messageId":"20180928154359.26919-1-martin.agren@gmail.com","threadId":"49449","inReplyTo":null,"subject":"[PATCH] t1400: drop debug `echo` to actually execute `test`","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2018-09-28T15:43:59Z","receivedAt":"2018-09-28T15:44:14Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"Instead of running `test \"foo\" = \"$(bar)\"`, we prefix the whole thing\nwith `echo`. Comparing to nearby tests makes it clear that this is just\ndebug leftover. This line has actually been modified four times since it\nwas introduced in e52290428b (General ref log reading improvements.,\n2006-05-19) and the `echo` has always survived. Let's finally drop it.\n\nThis script could need some more cleanups. This is just an immediate fix\nso that we actually test what we intend to.\n\nAll other hits for `git grep \"\\<echo test \" -- t/` seem fine. They want\nto create some input or expected output data.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n t/t1400-update-ref.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex 02493f14ba..b72beebe42 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -359,21 +359,21 @@ ld=\"Thu, 26 May 2005 18:43:00 -0500\"\n test_expect_success 'Query \"master@{May 25 2005}\" (before history)' '\n \ttest_when_finished \"rm -f o e\" &&\n \tgit rev-parse --verify \"master@{May 25 2005}\" >o 2>e &&\n \ttest $C = $(cat o) &&\n \ttest \"warning: Log for '\\''master'\\'' only goes back to $ed.\" = \"$(cat e)\"\n '\n test_expect_success 'Query master@{2005-05-25} (before history)' '\n \ttest_when_finished \"rm -f o e\" &&\n \tgit rev-parse --verify master@{2005-05-25} >o 2>e &&\n \ttest $C = $(cat o) &&\n-\techo test \"warning: Log for '\\''master'\\'' only goes back to $ed.\" = \"$(cat e)\"\n+\ttest \"warning: Log for '\\''master'\\'' only goes back to $ed.\" = \"$(cat e)\"\n '\n test_expect_success 'Query \"master@{May 26 2005 23:31:59}\" (1 second before history)' '\n \ttest_when_finished \"rm -f o e\" &&\n \tgit rev-parse --verify \"master@{May 26 2005 23:31:59}\" >o 2>e &&\n \ttest $C = $(cat o) &&\n \ttest \"warning: Log for '\\''master'\\'' only goes back to $ed.\" = \"$(cat e)\"\n '\n test_expect_success 'Query \"master@{May 26 2005 23:32:00}\" (exactly history start)' '\n \ttest_when_finished \"rm -f o e\" &&\n \tgit rev-parse --verify \"master@{May 26 2005 23:32:00}\" >o 2>e &&\n-- \n2.19.0.216.g2d3b1c576c\n\n"},{"id":"359280","messageId":"20180929080016.GH2174@sigill.intra.peff.net","threadId":"49449","inReplyTo":"20180928154359.26919-1-martin.agren@gmail.com","subject":"Re: [PATCH] t1400: drop debug `echo` to actually execute `test`","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-09-29T08:00:16Z","receivedAt":"2018-09-29T08:00:20Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Sep 28, 2018 at 05:43:59PM +0200, Martin Ågren wrote:\n\n> Instead of running `test \"foo\" = \"$(bar)\"`, we prefix the whole thing\n> with `echo`. Comparing to nearby tests makes it clear that this is just\n> debug leftover. This line has actually been modified four times since it\n> was introduced in e52290428b (General ref log reading improvements.,\n> 2006-05-19) and the `echo` has always survived. Let's finally drop it.\n\nHmm, yeah. I cannot see how this echo was ever accomplishing anything.\n\n> This script could need some more cleanups. This is just an immediate fix\n> so that we actually test what we intend to.\n\nYeah, this is definitely worth doing now, and not holding hostage to a\nbigger cleanup.\n\n> ---\n>  t/t1400-update-ref.sh | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n\nThe patch looks good to me. Thanks!\n\n-Peff\n"}]}