Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2019-11-13 02:08:10 +0300
committerJunio C Hamano <gitster@pobox.com>2019-11-21 03:41:51 +0300
commite959a18ee73d3e16c4ac2f300d61755e6b022bd7 (patch)
treef22f555edd2bb779ba5be995ad5800b7213e8af3 /t/t5520-pull.sh
parent5540ed27bcf30869b2f56e421cb9f52520d2c0a0 (diff)
t5520: don't put git in upstream of pipe
Before, if the invocation of git failed, it would be masked by the pipe since only the return code of the last element of a pipe is used. Rewrite the test to put the git command on its own line so its return code is not masked. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5520-pull.sh')
-rwxr-xr-xt/t5520-pull.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index 8b7e7ae55d..8ddf89e550 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -668,7 +668,8 @@ test_expect_success 'pull --rebase fails on corrupt HEAD' '
(
cd corrupt &&
test_commit one &&
- obj=$(git rev-parse --verify HEAD | sed "s#^..#&/#") &&
+ git rev-parse --verify HEAD >head &&
+ obj=$(sed "s#^..#&/#" head) &&
rm -f .git/objects/$obj &&
test_must_fail git pull --rebase
)