summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2019-08-27 04:05:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-09-05 19:58:52 (GMT)
commitdd2b6b6860e5955323057b7f97f627f686a3b0d9 (patch)
tree1ff7a53dd5ab2359d607856afce13860de363925 /t
parent6bd26f58ea27914547ff65f367a3b60f77a4d183 (diff)
downloadgit-dd2b6b6860e5955323057b7f97f627f686a3b0d9.zip
git-dd2b6b6860e5955323057b7f97f627f686a3b0d9.tar.gz
git-dd2b6b6860e5955323057b7f97f627f686a3b0d9.tar.bz2
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>
Diffstat (limited to 't')
-rwxr-xr-xt/t4014-format-patch.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 18142ee..67f4c62 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -319,7 +319,7 @@ test_expect_success 'reroll count (-v)' '
check_threading () {
expect="$1" &&
shift &&
- (git format-patch --stdout "$@"; echo $? >status.out) |
+ git format-patch --stdout "$@" >patch &&
# Prints everything between the Message-ID and In-Reply-To,
# and replaces all Message-ID-lookalikes by a sequence number
perl -ne '
@@ -334,8 +334,7 @@ check_threading () {
print;
}
print "---\n" if /^From /i;
- ' >actual &&
- test 0 = "$(cat status.out)" &&
+ ' <patch >actual &&
test_cmp "$expect" actual
}