git-svn: disable broken symlink workaround by default
Even though this will break things for some extremely rare repositories used by broken Windows clients, it's probably not worth enabling this by default as it has negatively affected many more users than it has helped from what we've seen so far. The extremely rare repositories that have broken symlinks in them will be silently corrupted in import; but users can still reenable this option and restart the import. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Eric Wong committed
Feb 27, 2009 at 19:40 UTC
48679e5c2d059b9b198d6f414dd80aa921d23002
2 files changed
+11
-1
git-svn.perl
+1
-1
@@ -3297,7 +3297,7 @@ sub new {
3297
sub _mark_empty_symlinks {
3298
my ($git_svn, $switch_path) = @_;
3299
my $bool = Git::config_bool('svn.brokenSymlinkWorkaround');
3300
- return {} if (defined($bool) && ! $bool);
3300
+ return {} if (!defined($bool)) || (defined($bool) && ! $bool);
3301
3302
my %ret;
3303
my ($rev, $cmt) = $git_svn->last_rev_commit;
t/t9131-git-svn-empty-symlink.sh
+10
@@ -83,6 +83,8 @@ EOF
83
'
84
85
test_expect_success 'clone using git svn' 'git svn clone -r1 "$svnrepo" x'
86
+test_expect_success 'enable broken symlink workaround' \
87
+ '(cd x && git config svn.brokenSymlinkWorkaround true)'
88
test_expect_success '"bar" is an empty file' 'test -f x/bar && ! test -s x/bar'
89
test_expect_success 'get "bar" => symlink fix from svn' \
90
'(cd x && git svn rebase)'
@@ -97,4 +99,12 @@ test_expect_success 'get "bar" => symlink fix from svn' \
99
'(cd y && git svn rebase)'
100
test_expect_success '"bar" does not become a symlink' '! test -L y/bar'
101
102
+# svn.brokenSymlinkWorkaround is unset
103
+test_expect_success 'clone using git svn' 'git svn clone -r1 "$svnrepo" z'
104
+test_expect_success '"bar" is an empty file' 'test -f z/bar && ! test -s z/bar'
105
+test_expect_success 'get "bar" => symlink fix from svn' \
106
+ '(cd z && git svn rebase)'
107
+test_expect_success '"bar" does not become a symlink' '! test -L z/bar'
108
+
109
+
110
test_done