Skip to content

Commit

Permalink
git svn: add authorsfile test case for ~/.gitconfig
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Wong committed Nov 14, 2009
1 parent 1a30582 commit e2f8617
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions t/t9130-git-svn-authors-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e2f8617

Please sign in to comment.