git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t5500-fetch-pack: ignore output from git init

From
Jeff King <peff@peff.net>
Date
May 24, 2009, 16:43 UTC
Message-ID
<20090524164329.GC22792@coredump.intra.peff.net>
In-Reply-To
<1243107282-9259-1-git-send-email-bebarino@gmail.com>
On Sat, May 23, 2009 at 12:34:42PM -0700, Stephen Boyd wrote:
> Signed-off-by: Stephen Boyd <bebarino@gmail.com>

There is no rationale given in the commit message, but I assume it is "this spews useless crap to the terminal that interferes with the usual test output".

However, this seems like the wrong direction. We already have a nice test infrastructure that redirects test output away from the user and respects "--verbose" to turn it back on. t5500 does quite a bit of work outside the test harness, and it makes more sense to me to move it inside. That would take care of your useless spew, _and_ it would help detect failures in a more robust way.

In other words:
Show 12 quoted lines
> diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
> index c450f33..ce74508 100755
> --- a/t/t5500-fetch-pack.sh
> +++ b/t/t5500-fetch-pack.sh
> @@ -97,7 +97,7 @@ pull_to_client () {
>  (
>  	mkdir client &&
>  	cd client &&
> -	git init 2>> log2.txt &&
> +	git init 2>> log2.txt > /dev/null &&
>  	git config transfer.unpacklimit 0
>  )
Why not:
  test_expect_success 'setup client repo' '
    mkdir client &&
    (cd client &&
     git init 2>>log2.txt &&
     git config transfer.unpacklimit 0
    )
  '
?
-Peff
Previous: Stephen BoydNext: Jeff King
Message 2 of 4 in “t5500-fetch-pack: ignore output from git init”
  1. t5500-fetch-pack: ignore output from git initStephen Boyd, May 23, 2009
  2. Jeff KingMay 24, 2009
  3. Jeff KingMay 24, 2009
  4. Stephen BoydMay 24, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.