{"thread":{"id":"39435","subject":"[PATCH] t7063: hide stderr from setup inside prereq","startedAt":"2015-05-27T09:34:58Z","lastAt":"2015-05-27T09:34:58Z","messageCount":1,"participants":["Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"262221","messageId":"20150527093457.GA2826@peff.net","threadId":"39435","inReplyTo":null,"subject":"[PATCH] t7063: hide stderr from setup inside prereq","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-05-27T09:34:58Z","receivedAt":"2015-05-27T09:34:58Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"When t7063 starts, it runs \"update-index --untracked-cache\"\nto see if we support the untracked cache. Its output goes\nstraight to stderr, even if the test is not run with \"-v\".\nLet's wrap it in a prereq that will hide the output by\ndefault, but show it with \"-v\".\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nI noticed this messing up my \"prove\" output. And it always runs first\nwith \"prove --state=slow\", because it has a whopping 17 seconds of\nsleeps in it.\n\n t/t7063-status-untracked-cache.sh | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh\nindex 2b2ffd7..bd4806c 100755\n--- a/t/t7063-status-untracked-cache.sh\n+++ b/t/t7063-status-untracked-cache.sh\n@@ -8,10 +8,14 @@ avoid_racy() {\n \tsleep 1\n }\n \n-git update-index --untracked-cache\n # It's fine if git update-index returns an error code other than one,\n # it'll be caught in the first test.\n-if test $? -eq 1; then\n+test_lazy_prereq UNTRACKED_CACHE '\n+\t{ git update-index --untracked-cache; ret=$?; } &&\n+\ttest $ret -ne 1\n+'\n+\n+if ! test_have_prereq UNTRACKED_CACHE; then\n \tskip_all='This system does not support untracked cache'\n \ttest_done\n fi\n-- \n2.4.1.552.g6de66a4\n"}]}