t5601: add more test cases for IPV6
[gitweb.git] / t / t9350-fast-export.sh
index 34c2d8f49ab6fd02a19e4b9f95e31838c8de3ece..66c8b0a371e37f90cff8da0c92f09c8784ec45a2 100755 (executable)
@@ -429,7 +429,7 @@ test_expect_success 'fast-export quotes pathnames' '
                --cacheinfo 100644 $blob "path with \\backslash" \
                --cacheinfo 100644 $blob "path with space" &&
         git commit -m addition &&
-        git ls-files -z -s | "$PERL_PATH" -0pe "s{\\t}{$&subdir/}" >index &&
+        git ls-files -z -s | perl -0pe "s{\\t}{$&subdir/}" >index &&
         git read-tree --empty &&
         git update-index -z --index-info <index &&
         git commit -m rename &&
@@ -504,4 +504,22 @@ test_expect_success 'refs are updated even if no commits need to be exported' '
        test_cmp expected actual
 '
 
+test_expect_success 'use refspec' '
+       git fast-export --refspec refs/heads/master:refs/heads/foobar master | \
+               grep "^commit " | sort | uniq > actual &&
+       echo "commit refs/heads/foobar" > expected &&
+       test_cmp expected actual
+'
+
+test_expect_success 'delete refspec' '
+       git branch to-delete &&
+       git fast-export --refspec :refs/heads/to-delete to-delete ^to-delete > actual &&
+       cat > expected <<-EOF &&
+       reset refs/heads/to-delete
+       from 0000000000000000000000000000000000000000
+
+       EOF
+       test_cmp expected actual
+'
+
 test_done