summaryrefslogtreecommitdiff
path: root/t/t5510-fetch.sh
diff options
context:
space:
mode:
authorPratik Karki <predatoramigo@gmail.com>2018-03-27 17:31:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-03-28 16:30:14 (GMT)
commita4d4e32a700df92ca576ce89110c075b8ce6da75 (patch)
tree4f991815ba071fc8849314f248018d1054a7ef99 /t/t5510-fetch.sh
parentd32eb83c1db7d0a8bb54fe743c6d1dd674d372c5 (diff)
downloadgit-a4d4e32a700df92ca576ce89110c075b8ce6da75.zip
git-a4d4e32a700df92ca576ce89110c075b8ce6da75.tar.gz
git-a4d4e32a700df92ca576ce89110c075b8ce6da75.tar.bz2
test: avoid pipes in git related commands for test
Avoid using pipes downstream of Git commands since the exit codes of commands upstream of pipes get swallowed, thus potentially hiding failure of those commands. Instead, capture Git command output to a file and apply the downstream command(s) to that file. Signed-off-by: Pratik Karki <predatoramigo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5510-fetch.sh')
-rwxr-xr-xt/t5510-fetch.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 3debc87..ad3bd08 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -690,8 +690,8 @@ test_expect_success C_LOCALE_OUTPUT 'fetch aligned output' '
test_commit looooooooooooong-tag &&
(
cd full-output &&
- git -c fetch.output=full fetch origin 2>&1 | \
- grep -e "->" | cut -c 22- >../actual
+ git -c fetch.output=full fetch origin >actual 2>&1 &&
+ grep -e "->" actual | cut -c 22- >../actual
) &&
cat >expect <<-\EOF &&
master -> origin/master
@@ -705,8 +705,8 @@ test_expect_success C_LOCALE_OUTPUT 'fetch compact output' '
test_commit extraaa &&
(
cd compact &&
- git -c fetch.output=compact fetch origin 2>&1 | \
- grep -e "->" | cut -c 22- >../actual
+ git -c fetch.output=compact fetch origin >actual 2>&1 &&
+ grep -e "->" actual | cut -c 22- >../actual
) &&
cat >expect <<-\EOF &&
master -> origin/*