git-p4: add failing test for "git-p4: respect excluded paths when detecting branches"
[gitweb.git] / t / t9350-fast-export.sh
index 50c2fceef403c6d047632cea4b31486984ad470d..5690fe28106624f3d666ccdda1dbcdd58673fb13 100755 (executable)
@@ -66,6 +66,34 @@ test_expect_success 'fast-export master~2..master' '
 
 '
 
+test_expect_success 'fast-export --reference-excluded-parents master~2..master' '
+
+       git fast-export --reference-excluded-parents master~2..master >actual &&
+       grep commit.refs/heads/master actual >commit-count &&
+       test_line_count = 2 commit-count &&
+       sed "s/master/rewrite/" actual |
+               (cd new &&
+                git fast-import &&
+                test $MASTER = $(git rev-parse --verify refs/heads/rewrite))
+'
+
+test_expect_success 'fast-export --show-original-ids' '
+
+       git fast-export --show-original-ids master >output &&
+       grep ^original-oid output| sed -e s/^original-oid.// | sort >actual &&
+       git rev-list --objects master muss >objects-and-names &&
+       awk "{print \$1}" objects-and-names | sort >commits-trees-blobs &&
+       comm -23 actual commits-trees-blobs >unfound &&
+       test_must_be_empty unfound
+'
+
+test_expect_success 'fast-export --show-original-ids | git fast-import' '
+
+       git fast-export --show-original-ids master muss | git fast-import --quiet &&
+       test $MASTER = $(git rev-parse --verify refs/heads/master) &&
+       test $MUSS = $(git rev-parse --verify refs/tags/muss)
+'
+
 test_expect_success 'iso-8859-1' '
 
        git config i18n.commitencoding ISO8859-1 &&