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>
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 '
print;
}
print "---\n" if /^From /i;
- ' >actual &&
- test 0 = "$(cat status.out)" &&
+ ' <patch >actual &&
test_cmp "$expect" actual
}