summaryrefslogtreecommitdiff
path: root/t/t5516-fetch-push.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-02-26 00:43:32 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-02-26 00:43:33 (GMT)
commit140045821aa78da3a80a7d7c8f707b955e1ab40d (patch)
tree9a8bb3c516eb72c8a5141dd3c162e3dc2d34d186 /t/t5516-fetch-push.sh
parentcadae717d557840d3566b7c0fc2003046e08c88f (diff)
parent20e416409fc2bc260faf65a0fc74927ed0d3ca12 (diff)
downloadgit-140045821aa78da3a80a7d7c8f707b955e1ab40d.zip
git-140045821aa78da3a80a7d7c8f707b955e1ab40d.tar.gz
git-140045821aa78da3a80a7d7c8f707b955e1ab40d.tar.bz2
Merge branch 'jc/push-delete-nothing'
"git push $there --delete ''" should have been diagnosed as an error, but instead turned into a matching push, which has been corrected. * jc/push-delete-nothing: push: do not turn --delete '' into a matching push
Diffstat (limited to 't/t5516-fetch-push.sh')
-rwxr-xr-xt/t5516-fetch-push.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 15262b4..f11742e 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -820,6 +820,11 @@ test_expect_success 'push --delete refuses src:dest refspecs' '
test_must_fail git push testrepo --delete main:foo
'
+test_expect_success 'push --delete refuses empty string' '
+ mk_test testrepo heads/master &&
+ test_must_fail git push testrepo --delete ""
+'
+
test_expect_success 'warn on push to HEAD of non-bare repository' '
mk_test testrepo heads/main &&
(