status: typo fix in usage
[git/gitweb.git] / t / t9131-git-svn-empty-symlink.sh
blob9a24a65b64111b4540db28315fedd4efd3b19ae7
1 #!/bin/sh
3 test_description='test that git handles an svn repository with empty symlinks'
5 . ./lib-git-svn.sh
6 test_expect_success 'load svn dumpfile' '
7 svnadmin load "$rawsvnrepo" <<EOF
8 SVN-fs-dump-format-version: 2
10 UUID: 60780f9a-7df5-43b4-83ab-60e2c0673ef7
12 Revision-number: 0
13 Prop-content-length: 56
14 Content-length: 56
16 K 8
17 svn:date
18 V 27
19 2008-11-26T07:17:27.590577Z
20 PROPS-END
22 Revision-number: 1
23 Prop-content-length: 111
24 Content-length: 111
26 K 7
27 svn:log
28 V 4
29 test
30 K 10
31 svn:author
32 V 12
33 normalperson
34 K 8
35 svn:date
36 V 27
37 2008-11-26T07:18:03.511836Z
38 PROPS-END
40 Node-path: bar
41 Node-kind: file
42 Node-action: add
43 Prop-content-length: 33
44 Text-content-length: 0
45 Text-content-md5: d41d8cd98f00b204e9800998ecf8427e
46 Content-length: 33
48 K 11
49 svn:special
50 V 1
52 PROPS-END
54 Revision-number: 2
55 Prop-content-length: 121
56 Content-length: 121
58 K 7
59 svn:log
60 V 13
61 bar => doink
63 K 10
64 svn:author
65 V 12
66 normalperson
67 K 8
68 svn:date
69 V 27
70 2008-11-27T03:55:31.601672Z
71 PROPS-END
73 Node-path: bar
74 Node-kind: file
75 Node-action: change
76 Text-content-length: 10
77 Text-content-md5: 92ca4fe7a9721f877f765c252dcd66c9
78 Content-length: 10
80 link doink
82 EOF
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)'
91 test_expect_success SYMLINKS '"bar" becomes a symlink' 'test -L x/bar'
94 test_expect_success 'clone using git svn' 'git svn clone -r1 "$svnrepo" y'
95 test_expect_success 'disable broken symlink workaround' \
96 '(cd y && git config svn.brokenSymlinkWorkaround false)'
97 test_expect_success '"bar" is an empty file' 'test -f y/bar && ! test -s y/bar'
98 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'
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'
110 test_done