aboutsummaryrefslogtreecommitdiff
path: root/t/t9130-git-svn-authors-file.sh
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-11-14 14:43:20 -0800
committerEric Wong <normalperson@yhbt.net>2009-11-14 14:43:59 -0800
commite2f8617b266e320fd58ab584cae2ebe9906daaac (patch)
treea266fb1e5da1d87ec9484a3b228eb882f3520c2a /t/t9130-git-svn-authors-file.sh
parent1a30582b43e137e16b3486d83bb86b0eb090e13d (diff)
downloadgit-e2f8617b266e320fd58ab584cae2ebe9906daaac.tar.gz
git-e2f8617b266e320fd58ab584cae2ebe9906daaac.tar.xz
git svn: add authorsfile test case for ~/.gitconfig
The commit for: git svn: read global+system config for clone+init Initially lacked a test case because the author was unable to reproduce it under his test environment, this adds it. Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 't/t9130-git-svn-authors-file.sh')
-rwxr-xr-xt/t9130-git-svn-authors-file.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t9130-git-svn-authors-file.sh b/t/t9130-git-svn-authors-file.sh
index f5abdb3c7..134411e0a 100755
--- a/t/t9130-git-svn-authors-file.sh
+++ b/t/t9130-git-svn-authors-file.sh
@@ -91,4 +91,27 @@ test_expect_success 'fetch continues after authors-file is fixed' '
)
'
+test_expect_success 'fresh clone with svn.authors-file in config' '
+ (
+ rm -r "$GIT_DIR" &&
+ test x = x"$(git config svn.authorsfile)" &&
+ HOME="`pwd`" &&
+ export HOME &&
+ test_config="$HOME"/.gitconfig &&
+ unset GIT_CONFIG_NOGLOBAL &&
+ unset GIT_DIR &&
+ unset GIT_CONFIG &&
+ git config --global \
+ svn.authorsfile "$HOME"/svn-authors &&
+ test x"$HOME"/svn-authors = x"$(git config svn.authorsfile)" &&
+ git svn clone "$svnrepo" gitconfig.clone &&
+ cd gitconfig.clone &&
+ nr_ex=$(git log | grep "^Author:.*example.com" | wc -l) &&
+ nr_rev=$(git rev-list HEAD | wc -l) &&
+ test $nr_rev -eq $nr_ex
+ )
+'
+
+test_debug 'GIT_DIR=gitconfig.clone/.git git log'
+
test_done