summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t5400-send-pack.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index d6151f8854..f2d5581b12 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -190,4 +190,17 @@ test_expect_success 'pushing wildcard refspecs respects forcing' '
test "$parent_head" = "$child_head"
'
+test_expect_success 'warn pushing to delete current branch' '
+ rewound_push_setup &&
+ (
+ cd child &&
+ git send-pack ../parent :refs/heads/master 2>errs
+ ) &&
+ grep "warning: to refuse deleting" child/errs &&
+ (
+ cd parent &&
+ test_must_fail git rev-parse --verify master
+ )
+'
+
test_done