]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t9350-fast-export.sh
fast-export: ensure we export requested refs
[thirdparty/git.git] / t / t9350-fast-export.sh
index 299120ba706d9663649785b8713ab340457e1bc9..50c2fceef403c6d047632cea4b31486984ad470d 100755 (executable)
@@ -544,10 +544,20 @@ test_expect_success 'use refspec' '
        test_cmp expected actual
 '
 
-test_expect_success 'delete refspec' '
+test_expect_success 'delete ref because entire history excluded' '
        git branch to-delete &&
-       git fast-export --refspec :refs/heads/to-delete to-delete ^to-delete > actual &&
-       cat > expected <<-EOF &&
+       git fast-export to-delete ^to-delete >actual &&
+       cat >expected <<-EOF &&
+       reset refs/heads/to-delete
+       from 0000000000000000000000000000000000000000
+
+       EOF
+       test_cmp expected actual
+'
+
+test_expect_success 'delete refspec' '
+       git fast-export --refspec :refs/heads/to-delete >actual &&
+       cat >expected <<-EOF &&
        reset refs/heads/to-delete
        from 0000000000000000000000000000000000000000