diff --git a/t/t5800-remote-helpers.sh b/t/t5800-remote-helpers.sh index 2d2bbb7f5a..b97c130af0 100755 --- a/t/t5800-remote-helpers.sh +++ b/t/t5800-remote-helpers.sh @@ -138,6 +138,14 @@ test_expect_success 'push new branch by name' ' compare_refs clone HEAD server refs/heads/new-name ' +test_expect_failure 'push new branch with old content' ' + (cd clone && + git checkout -b existing && + git push origin existing + ) && + compare_refs clone refs/heads/existing server refs/heads/existing +' + test_expect_failure 'push new branch with old:new refspec' ' (cd clone && git push origin new-name:new-refspec