Add global and system-wide gitattributes
[gitweb.git] / t / t9138-git-svn-authors-prog.sh
index a4b00f2a3fcecab62aaabeedd0821e38f179019a..83cc5fc9d1a381ecd006fa0a203f22dea0825a82 100755 (executable)
@@ -66,4 +66,18 @@ test_expect_success 'authors-file overrode authors-prog' '
        )
        '
 
+git --git-dir=x/.git config --unset svn.authorsfile
+git --git-dir=x/.git config --unset svn.authorsprog
+
+test_expect_success 'authors-prog handled special characters in username' '
+       svn mkdir -m bad --username "xyz; touch evil" "$svnrepo"/bad &&
+       (
+               cd x &&
+               git svn --authors-prog=../svn-authors-prog fetch &&
+               git rev-list -1 --pretty=raw refs/remotes/git-svn |
+               grep "^author xyz; touch evil <xyz; touch evil@example\.com> " &&
+               ! test -f evil
+       )
+'
+
 test_done