t4014: remove confusing pipe in check_threading()

In check_threading(), there was a Git command in the upstream of a pipe. In order to not lose its status code, it was saved into a file. However, this may be confusing so rewrite to redirect IO to file. This allows us to directly use the conventional &&-chain. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Denton Liu committed Aug 27, 2019 at 00:05 UTC dd2b6b6860e5955323057b7f97f627f686a3b0d9
1 file changed +2 -3
t/t4014-format-patch.sh
+2 -3
@@ -319,7 +319,7 @@ test_expect_success 'reroll count (-v)' '
319 check_threading () {
320 expect="$1" &&
321 shift &&
322 - (git format-patch --stdout "$@"; echo $? >status.out) |
322 + git format-patch --stdout "$@" >patch &&
323 # Prints everything between the Message-ID and In-Reply-To,
324 # and replaces all Message-ID-lookalikes by a sequence number
325 perl -ne '
@@ -334,8 +334,7 @@ check_threading () {
334 print;
335 }
336 print "---\n" if /^From /i;
337 - ' >actual &&
338 - test 0 = "$(cat status.out)" &&
337 + ' <patch >actual &&
338 test_cmp "$expect" actual
339 }
340