t1507-rev-parse-upstream: don't check the stderr of a shell function
authorSZEDER Gábor <redacted>
Fri, 23 Feb 2018 23:39:43 +0000 (00:39 +0100)
committerJunio C Hamano <redacted>
Tue, 27 Feb 2018 20:43:14 +0000 (12:43 -0800)
commitc3a44562431515210197b1344d7285be2763e8f5
tree6398769cb7f47fb8460296c6505fa9aa5dc843a6
parent5fc98e79fc0c40a5d25cb988d3948c0c0ec9f8b8
t1507-rev-parse-upstream: don't check the stderr of a shell function

Three tests in 't1507-rev-parse-upstream.sh' fail when the test script
is run with '-x' tracing (and using a shell other than a Bash version
supporting BASH_XTRACEFD).  The reason for those failures is that the
tests check the stderr of the function 'error_message', which includes
the trace of commands executed in that function as well, throwing off
the comparison with the expected output.

Save stderr of 'git rev-parse' only instead of the whole function, so
it remains free from tracing output.

After this change t1507 passes with '-x', even when running with
/bin/sh.

Signed-off-by: SZEDER Gábor <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/t1507-rev-parse-upstream.sh
git clone https://git.99rst.org/PROJECT