Merge branch 'sg/t5516-fixes'
authorJunio C Hamano <gitster@pobox.com>
Wed, 23 May 2018 05:38:12 +0000 (14:38 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 May 2018 05:38:12 +0000 (14:38 +0900)
Test fixes.

* sg/t5516-fixes:
t5516-fetch-push: fix broken &&-chain
t5516-fetch-push: fix 'push with dry-run' test

1  2 
t/t5516-fetch-push.sh
diff --combined t/t5516-fetch-push.sh
index 82239138d585bb859a1f2f81394cb6b6d8313bf4,013fb102d27512784d88a51d2b58aa39cf4451c5..3e8940eee5d5793c4b49b02586ab460b355a0f56
@@@ -94,6 -94,9 +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 +556,7 @@@ test_expect_success 'branch.*.pushremot
  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 +612,7 @@@ test_expect_success 'push does not upda
        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)
@@@ -1418,7 -1418,7 +1418,7 @@@ test_expect_success 'receive.denyCurren
                cd testrepo &&
                git reset --hard HEAD^ &&
                test $(git -C .. rev-parse HEAD^) = $(git rev-parse HEAD) &&
 -              test-chmtime +100 path1
 +              test-tool chmtime +100 path1
        ) &&
        git push testrepo master &&
        (