{"thread":{"id":"19458","subject":"[PATCH] t5500-fetch-pack: ignore output from git init","startedAt":"2009-05-23T19:34:42Z","lastAt":"2009-05-24T17:43:58Z","messageCount":4,"participants":["Stephen Boyd","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"114536","messageId":"1243107282-9259-1-git-send-email-bebarino@gmail.com","threadId":"19458","inReplyTo":null,"subject":"[PATCH] t5500-fetch-pack: ignore output from git init","fromName":"Stephen Boyd","fromEmail":"bebarino@gmail.com","sentAt":"2009-05-23T19:34:42Z","receivedAt":"2009-05-23T19:34:42Z","isPatch":true,"sender":{"key":"bebarino@gmail.com","avatar":"https://avatars.githubusercontent.com/u/38832?v=4"},"body":"Signed-off-by: Stephen Boyd <bebarino@gmail.com>\n---\n t/t5500-fetch-pack.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh\nindex c450f33..ce74508 100755\n--- a/t/t5500-fetch-pack.sh\n+++ b/t/t5500-fetch-pack.sh\n@@ -97,7 +97,7 @@ pull_to_client () {\n (\n \tmkdir client &&\n \tcd client &&\n-\tgit init 2>> log2.txt &&\n+\tgit init 2>> log2.txt > /dev/null &&\n \tgit config transfer.unpacklimit 0\n )\n \n-- \n1.6.3.1.145.gb74d77\n"},{"id":"114577","messageId":"20090524164329.GC22792@coredump.intra.peff.net","threadId":"19458","inReplyTo":"1243107282-9259-1-git-send-email-bebarino@gmail.com","subject":"Re: [PATCH] t5500-fetch-pack: ignore output from git init","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-05-24T16:43:30Z","receivedAt":"2009-05-24T16:43:30Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, May 23, 2009 at 12:34:42PM -0700, Stephen Boyd wrote:\n\n> Signed-off-by: Stephen Boyd <bebarino@gmail.com>\n\nThere is no rationale given in the commit message, but I assume it is\n\"this spews useless crap to the terminal that interferes with the usual\ntest output\".\n\nHowever, this seems like the wrong direction. We already have a nice\ntest infrastructure that redirects test output away from the user and\nrespects \"--verbose\" to turn it back on. t5500 does quite a bit of work\noutside the test harness, and it makes more sense to me to move it\ninside. That would take care of your useless spew, _and_ it would help\ndetect failures in a more robust way.\n\nIn other words:\n\n> diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh\n> index c450f33..ce74508 100755\n> --- a/t/t5500-fetch-pack.sh\n> +++ b/t/t5500-fetch-pack.sh\n> @@ -97,7 +97,7 @@ pull_to_client () {\n>  (\n>  \tmkdir client &&\n>  \tcd client &&\n> -\tgit init 2>> log2.txt &&\n> +\tgit init 2>> log2.txt > /dev/null &&\n>  \tgit config transfer.unpacklimit 0\n>  )\n\nWhy not:\n\n  test_expect_success 'setup client repo' '\n    mkdir client &&\n    (cd client &&\n     git init 2>>log2.txt &&\n     git config transfer.unpacklimit 0\n    )\n  '\n\n?\n\n-Peff\n"},{"id":"114578","messageId":"20090524164826.GD22792@coredump.intra.peff.net","threadId":"19458","inReplyTo":"20090524164329.GC22792@coredump.intra.peff.net","subject":"Re: [PATCH] t5500-fetch-pack: ignore output from git init","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-05-24T16:48:26Z","receivedAt":"2009-05-24T16:48:26Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, May 24, 2009 at 12:43:30PM -0400, Jeff King wrote:\n\n> > +++ b/t/t5500-fetch-pack.sh\n> > @@ -97,7 +97,7 @@ pull_to_client () {\n> >  (\n> >  \tmkdir client &&\n> >  \tcd client &&\n> > -\tgit init 2>> log2.txt &&\n> > +\tgit init 2>> log2.txt > /dev/null &&\n> >  \tgit config transfer.unpacklimit 0\n> >  )\n> \n> Why not:\n> \n>   test_expect_success 'setup client repo' '\n>     mkdir client &&\n>     (cd client &&\n>      git init 2>>log2.txt &&\n>      git config transfer.unpacklimit 0\n>     )\n>   '\n\nActually, taking a closer look at the script, I think you could probably\nditch the '2>>log2.txt' bit entirely. The log file is never read and\nappears to be completely for debugging. Putting the code into the test\nharness means that output will respect --verbose properly, which means a\nseparate log is unnecessary.\n\n-Peff\n"},{"id":"114582","messageId":"4A19875E.9090109@gmail.com","threadId":"19458","inReplyTo":"20090524164826.GD22792@coredump.intra.peff.net","subject":"Re: [PATCH] t5500-fetch-pack: ignore output from git init","fromName":"Stephen Boyd","fromEmail":"bebarino@gmail.com","sentAt":"2009-05-24T17:43:58Z","receivedAt":"2009-05-24T17:43:58Z","isPatch":true,"sender":{"key":"bebarino@gmail.com","avatar":"https://avatars.githubusercontent.com/u/38832?v=4"},"body":"Jeff King wrote:\n> Actually, taking a closer look at the script, I think you could probably\n> ditch the '2>>log2.txt' bit entirely. The log file is never read and\n> appears to be completely for debugging. Putting the code into the test\n> harness means that output will respect --verbose properly, which means a\n> separate log is unnecessary.\n>\n> -Peff\n\nYeah I sent this off real quick because of the reason you state\n(terminal crap). In the end, the test really needs to be modernized. If\nsomeone else doesn't get around to it, I'll start seeing what I can do\nto make it better.\n"}]}