Code

Merge branch 'kc/maint-diff-bwi-fix'
[git.git] / t / t9301-fast-export.sh
index 6ddd7c19fd22d0092829b861900fe462c5ffe73f..99857210555288cf5ca8f4fa4d1e94bfe557fbd2 100755 (executable)
@@ -231,4 +231,32 @@ test_expect_success 'fast-export -C -C | fast-import' '
 
 '
 
+test_expect_success 'fast-export | fast-import when master is tagged' '
+
+       git tag -m msg last &&
+       git fast-export -C -C --signed-tags=strip --all > output &&
+       test $(grep -c "^tag " output) = 3
+
+'
+
+cat > tag-content << EOF
+object $(git rev-parse HEAD)
+type commit
+tag rosten
+EOF
+
+test_expect_success 'cope with tagger-less tags' '
+
+       TAG=$(git hash-object -t tag -w tag-content) &&
+       git update-ref refs/tags/sonnenschein $TAG &&
+       git fast-export -C -C --signed-tags=strip --all > output &&
+       test $(grep -c "^tag " output) = 4 &&
+       ! grep "Unspecified Tagger" output &&
+       git fast-export -C -C --signed-tags=strip --all \
+               --fake-missing-tagger > output &&
+       test $(grep -c "^tag " output) = 4 &&
+       grep "Unspecified Tagger" output
+
+'
+
 test_done