summaryrefslogtreecommitdiff
path: root/t/t9100-git-svn-basic.sh
diff options
context:
space:
mode:
authorBarry Wardell <barry.wardell@gmail.com>2013-01-21 01:22:02 +0000
committerEric Wong <normalperson@yhbt.net>2013-01-24 10:21:23 +0000
commitbc93ceb7c5ec959ad275f575a3c49ff491337a8b (patch)
tree32b9b793f3fe6fc9cec2e0af33340f3062c5e723 /t/t9100-git-svn-basic.sh
parent1b67bef25606471817d9b0a61a923568de0daac8 (diff)
downloadgit-bc93ceb7c5ec959ad275f575a3c49ff491337a8b.tar.gz
git-svn: Simplify calculation of GIT_DIR
Since git-rev-parse already checks for the $GIT_DIR environment variable and that it returns an actual git repository, there is no need to repeat the checks again here. This also fixes a problem where git-svn did not work in cases where .git was a file with a gitdir: link. [ew: squashed test case, delay setting GIT_DIR until after `git rev-parse --cdup` to fix t9101, (thanks to Junio)] Signed-off-by: Barry Wardell <barry.wardell@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 't/t9100-git-svn-basic.sh')
-rwxr-xr-xt/t9100-git-svn-basic.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh
index 749b75e8d4..4fea8d901b 100755
--- a/t/t9100-git-svn-basic.sh
+++ b/t/t9100-git-svn-basic.sh
@@ -306,5 +306,13 @@ test_expect_success 'git-svn works in a bare repository' '
git svn fetch ) &&
rm -rf bare-repo
'
+test_expect_success 'git-svn works in in a repository with a gitdir: link' '
+ mkdir worktree gitdir &&
+ ( cd worktree &&
+ git svn init "$svnrepo" &&
+ git init --separate-git-dir ../gitdir &&
+ git svn fetch ) &&
+ rm -rf worktree gitdir
+ '
test_done