'
test_expect_success 'push --delete refuses src:dest refspecs' '
- mk_test testrepo heads/master &&
- test_must_fail git push testrepo --delete master:foo
+ mk_test testrepo heads/main &&
+ 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/master &&
+ mk_test testrepo heads/main &&
(
cd testrepo &&
- git checkout master &&
+ git checkout main &&
git config receive.denyCurrentBranch warn
) &&
- git push testrepo master 2>stderr &&
+ git push testrepo main 2>stderr &&
grep "warning: updating the current branch" stderr
'