test_expect_success 'push with matching heads' '
mk_test testrepo heads/master &&
- git push testrepo &&
+ git push testrepo : &&
check_push_result testrepo $the_commit heads/master
'
mk_test testrepo heads/master &&
git push testrepo : &&
git commit --amend -massaged &&
- git push --force testrepo &&
+ git push --force testrepo : &&
! check_push_result testrepo $the_commit heads/master &&
git reset --hard $the_commit
test_config remote.down.url down_repo &&
test_config branch.master.remote up &&
test_config remote.pushdefault down &&
+ test_config push.default matching &&
git push &&
check_push_result up_repo $the_first_commit heads/master &&
check_push_result down_repo $the_commit heads/master
git checkout master &&
test_config remote.there.url test2repo &&
test_config remote.there.pushurl testrepo &&
- git push there &&
+ git push there : &&
check_push_result testrepo $the_commit heads/master
'
test_config remote.down.url down_repo &&
test_config branch.master.remote up &&
test_config branch.master.pushremote down &&
+ test_config push.default matching &&
git push &&
check_push_result up_repo $the_first_commit heads/master &&
check_push_result side_repo $the_first_commit heads/master &&
cd testrepo &&
old_commit=$(git show-ref -s --verify refs/heads/master)
) &&
- git push --dry-run testrepo &&
+ git push --dry-run testrepo : &&
check_push_result testrepo $old_commit heads/master
'
test_expect_success 'push --prune' '
mk_test testrepo heads/master heads/second heads/foo heads/bar &&
- git push --prune testrepo &&
+ git push --prune testrepo : &&
check_push_result testrepo $the_commit heads/master &&
check_push_result testrepo $the_first_commit heads/second &&
! check_push_result testrepo $the_first_commit heads/foo heads/bar