summaryrefslogtreecommitdiff
path: root/t/t1507-rev-parse-upstream.sh
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2018-07-02 00:23:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-07-03 19:38:04 (GMT)
commit83279748594cf1c7a38ebf518cd6b63cd3d8de37 (patch)
tree72db4e9015b7facf2e653c3ab016efaadb5f3592 /t/t1507-rev-parse-upstream.sh
parente3331758f12da22f4103eec7efe1b5304a9be5e9 (diff)
downloadgit-83279748594cf1c7a38ebf518cd6b63cd3d8de37.zip
git-83279748594cf1c7a38ebf518cd6b63cd3d8de37.tar.gz
git-83279748594cf1c7a38ebf518cd6b63cd3d8de37.tar.bz2
t: use test_might_fail() instead of manipulating exit code manually
These tests manually coerce the exit code of invoked commands to "success" when they don't care if the command succeeds or fails since failure of those commands should not cause the test to fail overall. In doing so, they intentionally break the &&-chain. Modernize by replacing manual exit code management with test_might_fail() and a normal &&-chain. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1507-rev-parse-upstream.sh')
-rwxr-xr-xt/t1507-rev-parse-upstream.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh
index 93c77ea..349f6e1 100755
--- a/t/t1507-rev-parse-upstream.sh
+++ b/t/t1507-rev-parse-upstream.sh
@@ -123,9 +123,9 @@ test_expect_success 'checkout -b new my-side@{u} forks from the same' '
test_expect_success 'merge my-side@{u} records the correct name' '
(
- cd clone || exit
- git checkout master || exit
- git branch -D new ;# can fail but is ok
+ cd clone &&
+ git checkout master &&
+ test_might_fail git branch -D new &&
git branch -t new my-side@{u} &&
git merge -s ours new@{u} &&
git show -s --pretty=tformat:%s >actual &&