X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft5516-fetch-push.sh;h=c5c59335f36d0d8f6a26ee606fd605e74e2d1e33;hb=b84c343c885b8168047b2773b5c597d04337d9bd;hp=3af03d482727b69e4724d50eaf9ccc5fc8dceeee;hpb=8fe114a6e1d606eb806b3f87b17fc22f106af7b7;p=git.git diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh index 3af03d482..c5c59335f 100755 --- a/t/t5516-fetch-push.sh +++ b/t/t5516-fetch-push.sh @@ -165,6 +165,47 @@ test_expect_success 'push with matching heads' ' ' +test_expect_success 'push with matching heads on the command line' ' + + mk_test heads/master && + git push testrepo : && + check_push_result $the_commit heads/master + +' + +test_expect_success 'failed (non-fast-forward) push with matching heads' ' + + mk_test heads/master && + git push testrepo : && + git commit --amend -massaged && + ! git push testrepo && + check_push_result $the_commit heads/master && + git reset --hard $the_commit + +' + +test_expect_success 'push --force with matching heads' ' + + mk_test heads/master && + git push testrepo : && + git commit --amend -massaged && + git push --force testrepo && + ! check_push_result $the_commit heads/master && + git reset --hard $the_commit + +' + +test_expect_success 'push with matching heads and forced update' ' + + mk_test heads/master && + git push testrepo : && + git commit --amend -massaged && + git push testrepo +: && + ! check_push_result $the_commit heads/master && + git reset --hard $the_commit + +' + test_expect_success 'push with no ambiguity (1)' ' mk_test heads/master &&