Skip to content

Commit dd2b6b6

Browse files
Denton-Lgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6bd26f5 commit dd2b6b6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

t/t4014-format-patch.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ test_expect_success 'reroll count (-v)' '
319319
check_threading () {
320320
expect="$1" &&
321321
shift &&
322-
(git format-patch --stdout "$@"; echo $? >status.out) |
322+
git format-patch --stdout "$@" >patch &&
323323
# Prints everything between the Message-ID and In-Reply-To,
324324
# and replaces all Message-ID-lookalikes by a sequence number
325325
perl -ne '
@@ -334,8 +334,7 @@ check_threading () {
334334
print;
335335
}
336336
print "---\n" if /^From /i;
337-
' >actual &&
338-
test 0 = "$(cat status.out)" &&
337+
' <patch >actual &&
339338
test_cmp "$expect" actual
340339
}
341340

0 commit comments

Comments
 (0)