Subject: Re: [PATCH] Fix a false negative in t5512 when run using sh -x

From: Johannes Sixt <[email-masked]>
Date: Mon, 10 May 2010 12:23:52 +0200

Am 5/10/2010 11:09, schrieb Sverre Rabbelier:
> On Mon, May 10, 2010 at 09:19, Johannes Sixt <[email-masked]> wrote:
>> Use 'grep' to check for expected output.
> 
> Don't we do this ('test_cmp' on expected output) in many other places
> as well? Why is this different?

This is really only special because the test_cmp looked at the stderr of a
test_must_fail command. The old code was:

	test_must_fail git ls-remote refs*master >actual 2>&1 &&
	test_cmp exp actual

With bash, 'actual' contained:

  ++ git ls-remote 'refs*master'
  fatal: 'refs*master' does not appear to be a git repository
  fatal: The remote end hung up unexpectedly
  ++ test 128 -gt 0 -a 128 -le 129 -o 128 -gt 192

i.e., there were command traces in the file.

-- Hannes