Merge branch 'bc/fix-rebase-merge-skip'
[gitweb.git] / t / t9300-fast-import.sh
index 27263dfb80420a417bb0f33aa8731ef2fb7bc7b6..5fc9ef262ac1297d9442ed08208cb183ecc0e5c1 100755 (executable)
@@ -2999,4 +2999,22 @@ test_expect_success 'T: ls root tree' '
        test_cmp expect actual
 '
 
+test_expect_success 'T: delete branch' '
+       git branch to-delete &&
+       git fast-import <<-EOF &&
+       reset refs/heads/to-delete
+       from 0000000000000000000000000000000000000000
+       EOF
+       test_must_fail git rev-parse --verify refs/heads/to-delete
+'
+
+test_expect_success 'T: empty reset doesnt delete branch' '
+       git branch not-to-delete &&
+       git fast-import <<-EOF &&
+       reset refs/heads/not-to-delete
+       EOF
+       git show-ref &&
+       git rev-parse --verify refs/heads/not-to-delete
+'
+
 test_done