Skip to content

Commit c6f44e1

Browse files
pranitbauva1997gitster
authored andcommitted
t9813: avoid using pipes
The exit code of the upstream in a pipe is ignored thus we should avoid using it. By writing out the output of the git command to a file, we can test the exit codes of both the commands. Signed-off-by: Pranit Bauva <[email protected]> Acked-by: Luke Diamand <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c7cf956 commit c6f44e1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

t/t9813-git-p4-preserve-users.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,12 @@ test_expect_success 'not preserving user with mixed authorship' '
118118
make_change_by_user usernamefile3 Derek [email protected] &&
119119
P4EDITOR=cat P4USER=alice P4PASSWD=secret &&
120120
export P4EDITOR P4USER P4PASSWD &&
121-
git p4 commit |\
122-
grep "git author [email protected] does not match" &&
121+
git p4 commit >actual &&
122+
grep "git author [email protected] does not match" actual &&
123123
124124
make_change_by_user usernamefile3 Charlie [email protected] &&
125-
git p4 commit |\
126-
grep "git author [email protected] does not match" &&
125+
git p4 commit >actual &&
126+
grep "git author [email protected] does not match" actual &&
127127
128128
make_change_by_user usernamefile3 alice [email protected] &&
129129
git p4 commit >actual &&

0 commit comments

Comments
 (0)