]> git.ipfire.org Git - thirdparty/git.git/blame - t/t9131-git-svn-empty-symlink.sh
Merge branch 'wb/fsmonitor-bitmap-fix'
[thirdparty/git.git] / t / t9131-git-svn-empty-symlink.sh
CommitLineData
dbc6c74d
EW
1#!/bin/sh
2
3test_description='test that git handles an svn repository with empty symlinks'
4
5. ./lib-git-svn.sh
6test_expect_success 'load svn dumpfile' '
7 svnadmin load "$rawsvnrepo" <<EOF
8SVN-fs-dump-format-version: 2
9
10UUID: 60780f9a-7df5-43b4-83ab-60e2c0673ef7
11
12Revision-number: 0
13Prop-content-length: 56
14Content-length: 56
15
16K 8
17svn:date
18V 27
192008-11-26T07:17:27.590577Z
20PROPS-END
21
22Revision-number: 1
23Prop-content-length: 111
24Content-length: 111
25
26K 7
27svn:log
28V 4
29test
30K 10
31svn:author
32V 12
33normalperson
34K 8
35svn:date
36V 27
372008-11-26T07:18:03.511836Z
38PROPS-END
39
40Node-path: bar
41Node-kind: file
42Node-action: add
43Prop-content-length: 33
44Text-content-length: 0
45Text-content-md5: d41d8cd98f00b204e9800998ecf8427e
46Content-length: 33
47
48K 11
49svn:special
50V 1
51*
52PROPS-END
53
54Revision-number: 2
55Prop-content-length: 121
56Content-length: 121
57
58K 7
59svn:log
60V 13
61bar => doink
62
63K 10
64svn:author
65V 12
66normalperson
67K 8
68svn:date
69V 27
702008-11-27T03:55:31.601672Z
71PROPS-END
72
73Node-path: bar
74Node-kind: file
75Node-action: change
76Text-content-length: 10
77Text-content-md5: 92ca4fe7a9721f877f765c252dcd66c9
78Content-length: 10
79
80link doink
81
82EOF
83'
84
85test_expect_success 'clone using git svn' 'git svn clone -r1 "$svnrepo" x'
48679e5c
EW
86test_expect_success 'enable broken symlink workaround' \
87 '(cd x && git config svn.brokenSymlinkWorkaround true)'
ec10b018 88test_expect_success '"bar" is an empty file' 'test_must_be_empty x/bar'
dbc6c74d
EW
89test_expect_success 'get "bar" => symlink fix from svn' \
90 '(cd x && git svn rebase)'
afa08760 91test_expect_success SYMLINKS '"bar" becomes a symlink' 'test -h x/bar'
4c58a711
EW
92
93
94test_expect_success 'clone using git svn' 'git svn clone -r1 "$svnrepo" y'
95test_expect_success 'disable broken symlink workaround' \
96 '(cd y && git config svn.brokenSymlinkWorkaround false)'
ec10b018 97test_expect_success '"bar" is an empty file' 'test_must_be_empty y/bar'
4c58a711
EW
98test_expect_success 'get "bar" => symlink fix from svn' \
99 '(cd y && git svn rebase)'
100test_expect_success '"bar" does not become a symlink' '! test -L y/bar'
101
48679e5c
EW
102# svn.brokenSymlinkWorkaround is unset
103test_expect_success 'clone using git svn' 'git svn clone -r1 "$svnrepo" z'
ec10b018 104test_expect_success '"bar" is an empty file' 'test_must_be_empty z/bar'
48679e5c
EW
105test_expect_success 'get "bar" => symlink fix from svn' \
106 '(cd z && git svn rebase)'
107test_expect_success '"bar" does not become a symlink' '! test -L z/bar'
108
109
dbc6c74d 110test_done