]> asedeno.scripts.mit.edu Git - git.git/blobdiff - t/t9301-fast-export.sh
Merge branch 'maint' to sync with 1.5.6.3
[git.git] / t / t9301-fast-export.sh
index f09bfb1117caa05981d65e45fe2a9cc4c7ca19f3..f1bc5ceef0453fcdf711afd6225a5f0cd5dc69e5 100755 (executable)
@@ -77,6 +77,29 @@ test_expect_success 'iso-8859-1' '
                 git fast-import &&
                 git cat-file commit i18n | grep "Áéí óú")
 
+'
+test_expect_success 'import/export-marks' '
+
+       git checkout -b marks master &&
+       git fast-export --export-marks=tmp-marks HEAD &&
+       test -s tmp-marks &&
+       test $(wc -l < tmp-marks) -eq 3 &&
+       test $(
+               git fast-export --import-marks=tmp-marks\
+               --export-marks=tmp-marks HEAD |
+               grep ^commit |
+               wc -l) \
+       -eq 0 &&
+       echo change > file &&
+       git commit -m "last commit" file &&
+       test $(
+               git fast-export --import-marks=tmp-marks \
+               --export-marks=tmp-marks HEAD |
+               grep ^commit\  |
+               wc -l) \
+       -eq 1 &&
+       test $(wc -l < tmp-marks) -eq 4
+
 '
 
 cat > signed-tag-import << EOF