blob: 8a8ba65a2ae583aa5d0b0526e604a8f9613b5a5e [file] [log] [blame]
Eric Wong96a40b22006-02-20 10:57:29 -08001#!/bin/sh
2#
3# Copyright (c) 2006 Eric Wong
4#
5
Nanako Shiraishi1364ff22008-09-08 19:02:08 +09006test_description='git svn basic tests'
Ramsay Jones952182b2008-07-08 23:59:25 +01007GIT_SVN_LC_ALL=${LC_ALL:-$LANG}
Eric Wongdc62e252006-06-28 03:07:14 -07008
Eric Wong36f5b1f2006-05-23 19:23:41 -07009. ./lib-git-svn.sh
Eric Wong96a40b22006-02-20 10:57:29 -080010
Johannes Sixt7b7247b2009-02-24 21:13:39 +010011case "$GIT_SVN_LC_ALL" in
12*.UTF-8)
13 test_set_prereq UTF8
14 ;;
15*)
Ævar Arnfjörð Bjarmasonfadb5152010-06-24 17:44:48 +000016 say "# UTF-8 locale not set, some tests skipped ($GIT_SVN_LC_ALL)"
Johannes Sixt7b7247b2009-02-24 21:13:39 +010017 ;;
18esac
19
Eric Wongc0071ae2016-07-22 20:17:31 +000020test_expect_success 'git svn --version works anywhere' '
Jeff Kinga3c45d12016-12-15 21:31:59 -050021 nongit git svn --version
Eric Wongc0071ae2016-07-22 20:17:31 +000022'
23
24test_expect_success 'git svn help works anywhere' '
Jeff Kinga3c45d12016-12-15 21:31:59 -050025 nongit git svn help
Eric Wongc0071ae2016-07-22 20:17:31 +000026'
27
Eric Wong96a40b22006-02-20 10:57:29 -080028test_expect_success \
Nanako Shiraishif9647322008-09-10 06:25:27 +090029 'initialize git svn' '
Eric Wong39ed7c12006-12-26 16:27:37 -080030 mkdir import &&
Jonathan Nieder18a82692010-09-06 20:42:54 -050031 (
32 cd import &&
33 echo foo >foo &&
34 ln -s foo foo.link
35 mkdir -p dir/a/b/c/d/e &&
36 echo "deep dir" >dir/a/b/c/d/e/file &&
37 mkdir bar &&
38 echo "zzz" >bar/zzz &&
Michael J Gruber2605e952016-02-07 20:11:37 +010039 echo "#!/bin/sh" >exec.sh &&
40 chmod +x exec.sh &&
Jonathan Nieder18a82692010-09-06 20:42:54 -050041 svn_cmd import -m "import for git svn" . "$svnrepo" >/dev/null
Jens Lehmannfd4ec4f2010-09-06 20:39:54 +020042 ) &&
Eric Wong39ed7c12006-12-26 16:27:37 -080043 rm -rf import &&
Nanako Shiraishi1364ff22008-09-08 19:02:08 +090044 git svn init "$svnrepo"'
Eric Wong96a40b22006-02-20 10:57:29 -080045
46test_expect_success \
47 'import an SVN revision into git' \
Nanako Shiraishi1364ff22008-09-08 19:02:08 +090048 'git svn fetch'
Eric Wong96a40b22006-02-20 10:57:29 -080049
Bryan Donlanf69e8362008-05-04 01:37:59 -040050test_expect_success "checkout from svn" 'svn co "$svnrepo" "$SVN_TREE"'
Eric Wong96a40b22006-02-20 10:57:29 -080051
52name='try a deep --rmdir with a commit'
Bryan Donlanf69e8362008-05-04 01:37:59 -040053test_expect_success "$name" '
Jeff Kinge1c0c152016-05-13 16:47:14 -040054 git checkout -f -b mybranch remotes/git-svn &&
Eric Wong39ed7c12006-12-26 16:27:37 -080055 mv dir/a/b/c/d/e/file dir/file &&
56 cp dir/file file &&
57 git update-index --add --remove dir/a/b/c/d/e/file dir/file file &&
Bryan Donlanf69e8362008-05-04 01:37:59 -040058 git commit -m "$name" &&
Nanako Shiraishi1364ff22008-09-08 19:02:08 +090059 git svn set-tree --find-copies-harder --rmdir \
Jeff Kinge1c0c152016-05-13 16:47:14 -040060 remotes/git-svn..mybranch &&
Eygene Ryabinkinda083d62009-05-08 12:06:16 +040061 svn_cmd up "$SVN_TREE" &&
Bryan Donlanf69e8362008-05-04 01:37:59 -040062 test -d "$SVN_TREE"/dir && test ! -d "$SVN_TREE"/dir/a'
Eric Wong96a40b22006-02-20 10:57:29 -080063
64
65name='detect node change from file to directory #1'
Junio C Hamano41ac4142008-02-01 01:50:53 -080066test_expect_success "$name" "
Eric Wong39ed7c12006-12-26 16:27:37 -080067 mkdir dir/new_file &&
68 mv dir/file dir/new_file/file &&
69 mv dir/new_file dir/file &&
70 git update-index --remove dir/file &&
71 git update-index --add dir/file/file &&
Junio C Hamano41ac4142008-02-01 01:50:53 -080072 git commit -m '$name' &&
Nanako Shiraishi1364ff22008-09-08 19:02:08 +090073 test_must_fail git svn set-tree --find-copies-harder --rmdir \
Jeff Kinge1c0c152016-05-13 16:47:14 -040074 remotes/git-svn..mybranch
Junio C Hamano2ab5ca82012-02-21 21:10:33 -080075"
Eric Wong96a40b22006-02-20 10:57:29 -080076
77
78name='detect node change from directory to file #1'
Bryan Donlanf69e8362008-05-04 01:37:59 -040079test_expect_success "$name" '
80 rm -rf dir "$GIT_DIR"/index &&
Jeff Kinge1c0c152016-05-13 16:47:14 -040081 git checkout -f -b mybranch2 remotes/git-svn &&
Eric Wong39ed7c12006-12-26 16:27:37 -080082 mv bar/zzz zzz &&
83 rm -rf bar &&
84 mv zzz bar &&
85 git update-index --remove -- bar/zzz &&
86 git update-index --add -- bar &&
Bryan Donlanf69e8362008-05-04 01:37:59 -040087 git commit -m "$name" &&
Nanako Shiraishi1364ff22008-09-08 19:02:08 +090088 test_must_fail git svn set-tree --find-copies-harder --rmdir \
Jeff Kinge1c0c152016-05-13 16:47:14 -040089 remotes/git-svn..mybranch2
Junio C Hamano2ab5ca82012-02-21 21:10:33 -080090'
Eric Wong96a40b22006-02-20 10:57:29 -080091
92
93name='detect node change from file to directory #2'
Bryan Donlanf69e8362008-05-04 01:37:59 -040094test_expect_success "$name" '
95 rm -f "$GIT_DIR"/index &&
Jeff Kinge1c0c152016-05-13 16:47:14 -040096 git checkout -f -b mybranch3 remotes/git-svn &&
Eric Wong39ed7c12006-12-26 16:27:37 -080097 rm bar/zzz &&
Junio C Hamano5be60072007-07-02 22:52:14 -070098 git update-index --remove bar/zzz &&
Eric Wong39ed7c12006-12-26 16:27:37 -080099 mkdir bar/zzz &&
100 echo yyy > bar/zzz/yyy &&
Junio C Hamano5be60072007-07-02 22:52:14 -0700101 git update-index --add bar/zzz/yyy &&
Bryan Donlanf69e8362008-05-04 01:37:59 -0400102 git commit -m "$name" &&
Steven Walter379862e2012-02-20 09:17:54 -0500103 git svn set-tree --find-copies-harder --rmdir \
Jeff Kinge1c0c152016-05-13 16:47:14 -0400104 remotes/git-svn..mybranch3 &&
Steven Walter379862e2012-02-20 09:17:54 -0500105 svn_cmd up "$SVN_TREE" &&
106 test -d "$SVN_TREE"/bar/zzz &&
Junio C Hamano2ab5ca82012-02-21 21:10:33 -0800107 test -e "$SVN_TREE"/bar/zzz/yyy
108'
Eric Wong96a40b22006-02-20 10:57:29 -0800109
110name='detect node change from directory to file #2'
Bryan Donlanf69e8362008-05-04 01:37:59 -0400111test_expect_success "$name" '
112 rm -f "$GIT_DIR"/index &&
Jeff Kinge1c0c152016-05-13 16:47:14 -0400113 git checkout -f -b mybranch4 remotes/git-svn &&
Eric Wong39ed7c12006-12-26 16:27:37 -0800114 rm -rf dir &&
115 git update-index --remove -- dir/file &&
116 touch dir &&
117 echo asdf > dir &&
118 git update-index --add -- dir &&
Bryan Donlanf69e8362008-05-04 01:37:59 -0400119 git commit -m "$name" &&
Nanako Shiraishi1364ff22008-09-08 19:02:08 +0900120 test_must_fail git svn set-tree --find-copies-harder --rmdir \
Jeff Kinge1c0c152016-05-13 16:47:14 -0400121 remotes/git-svn..mybranch4
Junio C Hamano2ab5ca82012-02-21 21:10:33 -0800122'
Eric Wong96a40b22006-02-20 10:57:29 -0800123
124
125name='remove executable bit from a file'
Johannes Schindelinbcb11f12016-01-27 17:20:08 +0100126test_expect_success POSIXPERM "$name" '
Bryan Donlanf69e8362008-05-04 01:37:59 -0400127 rm -f "$GIT_DIR"/index &&
Jeff Kinge1c0c152016-05-13 16:47:14 -0400128 git checkout -f -b mybranch5 remotes/git-svn &&
Eric Wong39ed7c12006-12-26 16:27:37 -0800129 chmod -x exec.sh &&
130 git update-index exec.sh &&
Bryan Donlanf69e8362008-05-04 01:37:59 -0400131 git commit -m "$name" &&
Nanako Shiraishi1364ff22008-09-08 19:02:08 +0900132 git svn set-tree --find-copies-harder --rmdir \
Jeff Kinge1c0c152016-05-13 16:47:14 -0400133 remotes/git-svn..mybranch5 &&
Eygene Ryabinkinda083d62009-05-08 12:06:16 +0400134 svn_cmd up "$SVN_TREE" &&
Bryan Donlanf69e8362008-05-04 01:37:59 -0400135 test ! -x "$SVN_TREE"/exec.sh'
Eric Wong96a40b22006-02-20 10:57:29 -0800136
137
138name='add executable bit back file'
Johannes Schindelinbcb11f12016-01-27 17:20:08 +0100139test_expect_success POSIXPERM "$name" '
Eric Wong39ed7c12006-12-26 16:27:37 -0800140 chmod +x exec.sh &&
141 git update-index exec.sh &&
Bryan Donlanf69e8362008-05-04 01:37:59 -0400142 git commit -m "$name" &&
Nanako Shiraishi1364ff22008-09-08 19:02:08 +0900143 git svn set-tree --find-copies-harder --rmdir \
Jeff Kinge1c0c152016-05-13 16:47:14 -0400144 remotes/git-svn..mybranch5 &&
Eygene Ryabinkinda083d62009-05-08 12:06:16 +0400145 svn_cmd up "$SVN_TREE" &&
Bryan Donlanf69e8362008-05-04 01:37:59 -0400146 test -x "$SVN_TREE"/exec.sh'
Eric Wong96a40b22006-02-20 10:57:29 -0800147
148
Steven Walter379862e2012-02-20 09:17:54 -0500149name='executable file becomes a symlink to file'
Johannes Schindelinbcb11f12016-01-27 17:20:08 +0100150test_expect_success SYMLINKS "$name" '
Eric Wong5bd38702006-12-31 21:49:46 -0800151 rm exec.sh &&
Steven Walter379862e2012-02-20 09:17:54 -0500152 ln -s file exec.sh &&
Eric Wong5bd38702006-12-31 21:49:46 -0800153 git update-index exec.sh &&
Bryan Donlanf69e8362008-05-04 01:37:59 -0400154 git commit -m "$name" &&
Nanako Shiraishi1364ff22008-09-08 19:02:08 +0900155 git svn set-tree --find-copies-harder --rmdir \
Jeff Kinge1c0c152016-05-13 16:47:14 -0400156 remotes/git-svn..mybranch5 &&
Eygene Ryabinkinda083d62009-05-08 12:06:16 +0400157 svn_cmd up "$SVN_TREE" &&
Jeff Kingafa08762010-09-21 20:35:59 -0400158 test -h "$SVN_TREE"/exec.sh'
Eric Wong96a40b22006-02-20 10:57:29 -0800159
Eric Wong5bd38702006-12-31 21:49:46 -0800160name='new symlink is added to a file that was also just made executable'
Eric Wong96a40b22006-02-20 10:57:29 -0800161
Johannes Schindelinbcb11f12016-01-27 17:20:08 +0100162test_expect_success POSIXPERM,SYMLINKS "$name" '
Steven Walter379862e2012-02-20 09:17:54 -0500163 chmod +x file &&
164 ln -s file exec-2.sh &&
165 git update-index --add file exec-2.sh &&
Bryan Donlanf69e8362008-05-04 01:37:59 -0400166 git commit -m "$name" &&
Nanako Shiraishi1364ff22008-09-08 19:02:08 +0900167 git svn set-tree --find-copies-harder --rmdir \
Jeff Kinge1c0c152016-05-13 16:47:14 -0400168 remotes/git-svn..mybranch5 &&
Eygene Ryabinkinda083d62009-05-08 12:06:16 +0400169 svn_cmd up "$SVN_TREE" &&
Steven Walter379862e2012-02-20 09:17:54 -0500170 test -x "$SVN_TREE"/file &&
Jeff Kingafa08762010-09-21 20:35:59 -0400171 test -h "$SVN_TREE"/exec-2.sh'
Eric Wong96a40b22006-02-20 10:57:29 -0800172
Eric Wong5bd38702006-12-31 21:49:46 -0800173name='modify a symlink to become a file'
Johannes Schindelinbcb11f12016-01-27 17:20:08 +0100174test_expect_success POSIXPERM,SYMLINKS "$name" '
Junio C Hamano2ab5ca82012-02-21 21:10:33 -0800175 echo git help >help &&
Eric Wong5bd38702006-12-31 21:49:46 -0800176 rm exec-2.sh &&
177 cp help exec-2.sh &&
178 git update-index exec-2.sh &&
Bryan Donlanf69e8362008-05-04 01:37:59 -0400179 git commit -m "$name" &&
Nanako Shiraishi1364ff22008-09-08 19:02:08 +0900180 git svn set-tree --find-copies-harder --rmdir \
Jeff Kinge1c0c152016-05-13 16:47:14 -0400181 remotes/git-svn..mybranch5 &&
Eygene Ryabinkinda083d62009-05-08 12:06:16 +0400182 svn_cmd up "$SVN_TREE" &&
Bryan Donlanf69e8362008-05-04 01:37:59 -0400183 test -f "$SVN_TREE"/exec-2.sh &&
Jeff Kingafa08762010-09-21 20:35:59 -0400184 test ! -h "$SVN_TREE"/exec-2.sh &&
Junio C Hamano3af82862008-05-23 22:28:56 -0700185 test_cmp help "$SVN_TREE"/exec-2.sh'
Eric Wong96a40b22006-02-20 10:57:29 -0800186
Johannes Sixt7b7247b2009-02-24 21:13:39 +0100187name="commit with UTF-8 message: locale: $GIT_SVN_LC_ALL"
188LC_ALL="$GIT_SVN_LC_ALL"
189export LC_ALL
Johannes Schindelinbcb11f12016-01-27 17:20:08 +0100190# This test relies on the previous test, hence requires POSIXPERM,SYMLINKS
191test_expect_success UTF8,POSIXPERM,SYMLINKS "$name" "
Johannes Sixt7b7247b2009-02-24 21:13:39 +0100192 echo '# hello' >> exec-2.sh &&
193 git update-index exec-2.sh &&
194 git commit -m 'éï∏' &&
195 git svn set-tree HEAD"
196unset LC_ALL
Eric Wong96a40b22006-02-20 10:57:29 -0800197
198name='test fetch functionality (svn => git) with alternate GIT_SVN_ID'
199GIT_SVN_ID=alt
200export GIT_SVN_ID
201test_expect_success "$name" \
Nanako Shiraishi1364ff22008-09-08 19:02:08 +0900202 'git svn init "$svnrepo" && git svn fetch &&
Jeff Kinge1c0c152016-05-13 16:47:14 -0400203 git rev-list --pretty=raw remotes/git-svn | grep ^tree | uniq > a &&
Junio C Hamano5be60072007-07-02 22:52:14 -0700204 git rev-list --pretty=raw remotes/alt | grep ^tree | uniq > b &&
Junio C Hamano3af82862008-05-23 22:28:56 -0700205 test_cmp a b'
Eric Wong96a40b22006-02-20 10:57:29 -0800206
Eric Wong42d32872006-06-13 04:02:23 -0700207name='check imported tree checksums expected tree checksums'
Eric Wong86f36372006-06-15 19:13:56 -0700208rm -f expected
Johannes Sixt7b7247b2009-02-24 21:13:39 +0100209if test_have_prereq UTF8
Eric Wong86f36372006-06-15 19:13:56 -0700210then
Steven Walter379862e2012-02-20 09:17:54 -0500211 echo tree dc68b14b733e4ec85b04ab6f712340edc5dc936e > expected
Eric Wong86f36372006-06-15 19:13:56 -0700212fi
213cat >> expected <<\EOF
Steven Walter379862e2012-02-20 09:17:54 -0500214tree c3322890dcf74901f32d216f05c5044f670ce632
215tree d3ccd5035feafd17b030c5732e7808cc49122853
216tree d03e1630363d4881e68929d532746b20b0986b83
217tree 149d63cd5878155c846e8c55d7d8487de283f89e
218tree 312b76e4f64ce14893aeac8591eb3960b065e247
219tree 149d63cd5878155c846e8c55d7d8487de283f89e
Eric Wong42d32872006-06-13 04:02:23 -0700220tree d667270a1f7b109f5eb3aaea21ede14b56bfdd6e
221tree 8f51f74cf0163afc9ad68a4b1537288c4558b5a4
222EOF
Eric Wonge1516112006-11-27 21:46:50 -0800223
Johannes Schindelinbcb11f12016-01-27 17:20:08 +0100224test_expect_success POSIXPERM,SYMLINKS "$name" "test_cmp a expected"
Eric Wong42d32872006-06-13 04:02:23 -0700225
Jeff King577dfd02016-05-13 16:47:18 -0400226test_expect_success 'exit if remote refs are ambigious' '
Junio C Hamano5be60072007-07-02 22:52:14 -0700227 git config --add svn-remote.svn.fetch \
Jeff Kinge1c0c152016-05-13 16:47:14 -0400228 bar:refs/remotes/git-svn &&
Nanako Shiraishi1364ff22008-09-08 19:02:08 +0900229 test_must_fail git svn migrate
Jeff King577dfd02016-05-13 16:47:18 -0400230'
Eric Wonge6434f82007-01-23 16:29:23 -0800231
Bryan Donlanf69e8362008-05-04 01:37:59 -0400232test_expect_success 'exit if init-ing a would clobber a URL' '
233 svnadmin create "${PWD}/svnrepo2" &&
234 svn mkdir -m "mkdir bar" "${svnrepo}2/bar" &&
Junio C Hamano5be60072007-07-02 22:52:14 -0700235 git config --unset svn-remote.svn.fetch \
Jeff Kinge1c0c152016-05-13 16:47:14 -0400236 "^bar:refs/remotes/git-svn$" &&
Nanako Shiraishi1364ff22008-09-08 19:02:08 +0900237 test_must_fail git svn init "${svnrepo}2/bar"
Bryan Donlanf69e8362008-05-04 01:37:59 -0400238 '
Eric Wonge6434f82007-01-23 16:29:23 -0800239
240test_expect_success \
Bryan Donlanf69e8362008-05-04 01:37:59 -0400241 'init allows us to connect to another directory in the same repo' '
Nanako Shiraishi1364ff22008-09-08 19:02:08 +0900242 git svn init --minimize-url -i bar "$svnrepo/bar" &&
Eric Wongccb6b6f2007-02-13 17:38:58 -0800243 git config --get svn-remote.svn.fetch \
Bryan Donlanf69e8362008-05-04 01:37:59 -0400244 "^bar:refs/remotes/bar$" &&
Eric Wongccb6b6f2007-02-13 17:38:58 -0800245 git config --get svn-remote.svn.fetch \
Jeff Kinge1c0c152016-05-13 16:47:14 -0400246 "^:refs/remotes/git-svn$"
Bryan Donlanf69e8362008-05-04 01:37:59 -0400247 '
Eric Wongb805b442007-01-22 13:52:04 -0800248
Thomas Rast5eec27e2009-05-29 17:09:42 +0200249test_expect_success 'dcommit $rev does not clobber current branch' '
250 git svn fetch -i bar &&
251 git checkout -b my-bar refs/remotes/bar &&
252 echo 1 > foo &&
253 git add foo &&
254 git commit -m "change 1" &&
255 echo 2 > foo &&
256 git add foo &&
257 git commit -m "change 2" &&
258 old_head=$(git rev-parse HEAD) &&
259 git svn dcommit -i bar HEAD^ &&
260 test $old_head = $(git rev-parse HEAD) &&
261 test refs/heads/my-bar = $(git symbolic-ref HEAD) &&
262 git log refs/remotes/bar | grep "change 1" &&
263 ! git log refs/remotes/bar | grep "change 2" &&
264 git checkout master &&
265 git branch -D my-bar
266 '
267
Jeff King577dfd02016-05-13 16:47:18 -0400268test_expect_success 'able to dcommit to a subdirectory' '
Nanako Shiraishi1364ff22008-09-08 19:02:08 +0900269 git svn fetch -i bar &&
Eric Wongd3a840d2007-01-26 01:32:45 -0800270 git checkout -b my-bar refs/remotes/bar &&
271 echo abc > d &&
272 git update-index --add d &&
Jeff King577dfd02016-05-13 16:47:18 -0400273 git commit -m "/bar/d should be in the log" &&
Nanako Shiraishi1364ff22008-09-08 19:02:08 +0900274 git svn dcommit -i bar &&
Jeff King577dfd02016-05-13 16:47:18 -0400275 test -z "$(git diff refs/heads/my-bar refs/remotes/bar)" &&
Eric Wongd3a840d2007-01-26 01:32:45 -0800276 mkdir newdir &&
277 echo new > newdir/dir &&
278 git update-index --add newdir/dir &&
Jeff King577dfd02016-05-13 16:47:18 -0400279 git commit -m "add a new directory" &&
Nanako Shiraishi1364ff22008-09-08 19:02:08 +0900280 git svn dcommit -i bar &&
Jeff King577dfd02016-05-13 16:47:18 -0400281 test -z "$(git diff refs/heads/my-bar refs/remotes/bar)" &&
Eric Wongd3a840d2007-01-26 01:32:45 -0800282 echo foo >> newdir/dir &&
283 git update-index newdir/dir &&
Jeff King577dfd02016-05-13 16:47:18 -0400284 git commit -m "modify a file in new directory" &&
Nanako Shiraishi1364ff22008-09-08 19:02:08 +0900285 git svn dcommit -i bar &&
Jeff King577dfd02016-05-13 16:47:18 -0400286 test -z "$(git diff refs/heads/my-bar refs/remotes/bar)"
287'
Eric Wongd3a840d2007-01-26 01:32:45 -0800288
David D. Kilzer181264a2010-08-02 12:58:19 -0700289test_expect_success 'dcommit should not fail with a touched file' '
290 test_commit "commit-new-file-foo2" foo2 &&
291 test-chmtime =-60 foo &&
292 git svn dcommit
293'
294
295test_expect_success 'rebase should not fail with a touched file' '
296 test-chmtime =-60 foo &&
297 git svn rebase
298'
299
Jeff King577dfd02016-05-13 16:47:18 -0400300test_expect_success 'able to set-tree to a subdirectory' '
Eric Wongd3a840d2007-01-26 01:32:45 -0800301 echo cba > d &&
302 git update-index d &&
Jeff King577dfd02016-05-13 16:47:18 -0400303 git commit -m "update /bar/d" &&
Nanako Shiraishi1364ff22008-09-08 19:02:08 +0900304 git svn set-tree -i bar HEAD &&
Jeff King577dfd02016-05-13 16:47:18 -0400305 test -z "$(git diff refs/heads/my-bar refs/remotes/bar)"
306'
Eric Wongd3a840d2007-01-26 01:32:45 -0800307
Deskin Miller6e5121f2008-11-06 00:07:39 -0500308test_expect_success 'git-svn works in a bare repository' '
309 mkdir bare-repo &&
310 ( cd bare-repo &&
311 git init --bare &&
312 GIT_DIR=. git svn init "$svnrepo" &&
313 git svn fetch ) &&
314 rm -rf bare-repo
315 '
Barry Wardellbc93ceb2013-01-21 01:22:02 +0000316test_expect_success 'git-svn works in in a repository with a gitdir: link' '
317 mkdir worktree gitdir &&
318 ( cd worktree &&
319 git svn init "$svnrepo" &&
320 git init --separate-git-dir ../gitdir &&
321 git svn fetch ) &&
322 rm -rf worktree gitdir
323 '
Deskin Miller6e5121f2008-11-06 00:07:39 -0500324
Eric Wong96a40b22006-02-20 10:57:29 -0800325test_done