summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-23 05:38:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-23 05:38:12 (GMT)
commitc8311980f926483b6633dbec0f77d3edeab01365 (patch)
tree7b1fb814a55f4b2f691fdf77b12e60ef5e3c53cf /t
parentc4e7220f0873086f1f1e3dffc9b2d9964f93636b (diff)
parentf6b82970aa8b81dbaf9242c5a0b33dd8a08431b7 (diff)
downloadgit-c8311980f926483b6633dbec0f77d3edeab01365.zip
git-c8311980f926483b6633dbec0f77d3edeab01365.tar.gz
git-c8311980f926483b6633dbec0f77d3edeab01365.tar.bz2
Merge branch 'sg/t5516-fixes'
Test fixes. * sg/t5516-fixes: t5516-fetch-push: fix broken &&-chain t5516-fetch-push: fix 'push with dry-run' test
Diffstat (limited to 't')
-rwxr-xr-xt/t5516-fetch-push.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 8223913..3e8940e 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -94,6 +94,9 @@ mk_child() {
}
check_push_result () {
+ test $# -ge 3 ||
+ error "bug in the test script: check_push_result requires at least 3 parameters"
+
repo_name="$1"
shift
@@ -553,10 +556,7 @@ test_expect_success 'branch.*.pushremote config order is irrelevant' '
test_expect_success 'push with dry-run' '
mk_test testrepo heads/master &&
- (
- cd testrepo &&
- old_commit=$(git show-ref -s --verify refs/heads/master)
- ) &&
+ old_commit=$(git -C testrepo show-ref -s --verify refs/heads/master) &&
git push --dry-run testrepo : &&
check_push_result testrepo $old_commit heads/master
'
@@ -612,7 +612,7 @@ test_expect_success 'push does not update local refs on failure' '
chmod +x testrepo/.git/hooks/pre-receive &&
(
cd child &&
- git pull .. master
+ git pull .. master &&
test_must_fail git push &&
test $(git rev-parse master) != \
$(git rev-parse remotes/origin/master)