]> git.ipfire.org Git - thirdparty/git.git/blame - t/t9132-git-svn-broken-symlink.sh
Sync with 2.36.3
[thirdparty/git.git] / t / t9132-git-svn-broken-symlink.sh
CommitLineData
baf5fa8a
EW
1#!/bin/sh
2
3test_description='test that git handles an svn repository with empty symlinks'
4
7a98d9ab 5TEST_FAILS_SANITIZE_LEAK=true
baf5fa8a
EW
6. ./lib-git-svn.sh
7test_expect_success 'load svn dumpfile' '
8 svnadmin load "$rawsvnrepo" <<EOF
9SVN-fs-dump-format-version: 2
10
11UUID: 60780f9a-7df5-43b4-83ab-60e2c0673ef7
12
13Revision-number: 0
14Prop-content-length: 56
15Content-length: 56
16
17K 8
18svn:date
19V 27
202008-11-26T07:17:27.590577Z
21PROPS-END
22
23Revision-number: 1
24Prop-content-length: 111
25Content-length: 111
26
27K 7
28svn:log
29V 4
30test
31K 10
32svn:author
33V 12
34normalperson
35K 8
36svn:date
37V 27
382008-11-26T07:18:03.511836Z
39PROPS-END
40
41Node-path: bar
42Node-kind: file
43Node-action: add
44Prop-content-length: 33
45Text-content-length: 4
46Text-content-md5: 912ec803b2ce49e4a541068d495ab570
47Content-length: 37
48
49K 11
50svn:special
51V 1
52*
53PROPS-END
54asdf
55
56Revision-number: 2
57Prop-content-length: 121
58Content-length: 121
59
60K 7
61svn:log
62V 13
63bar => doink
64
65K 10
66svn:author
67V 12
68normalperson
69K 8
70svn:date
71V 27
722008-11-27T03:55:31.601672Z
73PROPS-END
74
75Node-path: bar
76Node-kind: file
77Node-action: change
78Text-content-length: 10
79Text-content-md5: 92ca4fe7a9721f877f765c252dcd66c9
80Content-length: 10
81
82link doink
83
84EOF
85'
86
87test_expect_success 'clone using git svn' 'git svn clone -r1 "$svnrepo" x'
88
704a3143 89test_expect_success SYMLINKS '"bar" is a symlink that points to "asdf"' '
baf5fa8a 90 test -L x/bar &&
becd67fd 91 (cd x && test xasdf = x"$(git cat-file blob HEAD:bar)")
baf5fa8a
EW
92'
93
94test_expect_success 'get "bar" => symlink fix from svn' '
95 (cd x && git svn rebase)
96'
97
704a3143 98test_expect_success SYMLINKS '"bar" remains a proper symlink' '
baf5fa8a 99 test -L x/bar &&
becd67fd 100 (cd x && test xdoink = x"$(git cat-file blob HEAD:bar)")
baf5fa8a
EW
101'
102
103test_done