File: t9132-git-svn-broken-symlink.sh

package info (click to toggle)
git 1%3A2.20.1-2%2Bdeb10u3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 45,676 kB
  • sloc: ansic: 210,769; sh: 180,432; perl: 29,102; tcl: 21,663; python: 6,143; makefile: 3,700; sed: 189; php: 120; asm: 98; csh: 45; ruby: 24; lisp: 12
file content (102 lines) | stat: -rwxr-xr-x 1,584 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/sh

test_description='test that git handles an svn repository with empty symlinks'

. ./lib-git-svn.sh
test_expect_success 'load svn dumpfile' '
	svnadmin load "$rawsvnrepo" <<EOF
SVN-fs-dump-format-version: 2

UUID: 60780f9a-7df5-43b4-83ab-60e2c0673ef7

Revision-number: 0
Prop-content-length: 56
Content-length: 56

K 8
svn:date
V 27
2008-11-26T07:17:27.590577Z
PROPS-END

Revision-number: 1
Prop-content-length: 111
Content-length: 111

K 7
svn:log
V 4
test
K 10
svn:author
V 12
normalperson
K 8
svn:date
V 27
2008-11-26T07:18:03.511836Z
PROPS-END

Node-path: bar
Node-kind: file
Node-action: add
Prop-content-length: 33
Text-content-length: 4
Text-content-md5: 912ec803b2ce49e4a541068d495ab570
Content-length: 37

K 11
svn:special
V 1
*
PROPS-END
asdf

Revision-number: 2
Prop-content-length: 121
Content-length: 121

K 7
svn:log
V 13
bar => doink

K 10
svn:author
V 12
normalperson
K 8
svn:date
V 27
2008-11-27T03:55:31.601672Z
PROPS-END

Node-path: bar
Node-kind: file
Node-action: change
Text-content-length: 10
Text-content-md5: 92ca4fe7a9721f877f765c252dcd66c9
Content-length: 10

link doink

EOF
'

test_expect_success 'clone using git svn' 'git svn clone -r1 "$svnrepo" x'

test_expect_success SYMLINKS '"bar" is a symlink that points to "asdf"' '
	test -L x/bar &&
	(cd x && test xasdf = x"$(git cat-file blob HEAD:bar)")
'

test_expect_success 'get "bar" => symlink fix from svn' '
	(cd x && git svn rebase)
'

test_expect_success SYMLINKS '"bar" remains a proper symlink' '
	test -L x/bar &&
	(cd x && test xdoink = x"$(git cat-file blob HEAD:bar)")
'

test_done