@@ -9,20 +9,19 @@ test_description='git apply should not get confused with type changes.
9
9
10
10
. ./test-lib.sh
11
11
12
- test_expect_success SYMLINKS ' setup repository and commits' '
12
+ test_expect_success ' setup repository and commits' '
13
13
echo "hello world" > foo &&
14
14
echo "hi planet" > bar &&
15
15
git update-index --add foo bar &&
16
16
git commit -m initial &&
17
17
git branch initial &&
18
18
rm -f foo &&
19
- ln -s bar foo &&
20
- git update-index foo &&
19
+ test_ln_s_add bar foo &&
21
20
git commit -m "foo symlinked to bar" &&
22
21
git branch foo-symlinked-to-bar &&
23
- rm -f foo &&
22
+ git rm -f foo &&
24
23
echo "how far is the sun?" > foo &&
25
- git update-index foo &&
24
+ git update-index --add foo &&
26
25
git commit -m "foo back to file" &&
27
26
git branch foo-back-to-file &&
28
27
printf "\0" > foo &&
@@ -42,77 +41,77 @@ test_expect_success SYMLINKS 'setup repository and commits' '
42
41
git branch foo-baz-renamed-from-foo
43
42
'
44
43
45
- test_expect_success SYMLINKS ' file renamed from foo to foo/baz' '
44
+ test_expect_success ' file renamed from foo to foo/baz' '
46
45
git checkout -f initial &&
47
46
git diff-tree -M -p HEAD foo-baz-renamed-from-foo > patch &&
48
47
git apply --index < patch
49
48
'
50
49
test_debug ' cat patch'
51
50
52
51
53
- test_expect_success SYMLINKS ' file renamed from foo/baz to foo' '
52
+ test_expect_success ' file renamed from foo/baz to foo' '
54
53
git checkout -f foo-baz-renamed-from-foo &&
55
54
git diff-tree -M -p HEAD initial > patch &&
56
55
git apply --index < patch
57
56
'
58
57
test_debug ' cat patch'
59
58
60
59
61
- test_expect_success SYMLINKS ' directory becomes file' '
60
+ test_expect_success ' directory becomes file' '
62
61
git checkout -f foo-becomes-a-directory &&
63
62
git diff-tree -p HEAD initial > patch &&
64
63
git apply --index < patch
65
64
'
66
65
test_debug ' cat patch'
67
66
68
67
69
- test_expect_success SYMLINKS ' file becomes directory' '
68
+ test_expect_success ' file becomes directory' '
70
69
git checkout -f initial &&
71
70
git diff-tree -p HEAD foo-becomes-a-directory > patch &&
72
71
git apply --index < patch
73
72
'
74
73
test_debug ' cat patch'
75
74
76
75
77
- test_expect_success SYMLINKS ' file becomes symlink' '
76
+ test_expect_success ' file becomes symlink' '
78
77
git checkout -f initial &&
79
78
git diff-tree -p HEAD foo-symlinked-to-bar > patch &&
80
79
git apply --index < patch
81
80
'
82
81
test_debug ' cat patch'
83
82
84
83
85
- test_expect_success SYMLINKS ' symlink becomes file' '
84
+ test_expect_success ' symlink becomes file' '
86
85
git checkout -f foo-symlinked-to-bar &&
87
86
git diff-tree -p HEAD foo-back-to-file > patch &&
88
87
git apply --index < patch
89
88
'
90
89
test_debug ' cat patch'
91
90
92
- test_expect_success SYMLINKS ' binary file becomes symlink' '
91
+ test_expect_success ' binary file becomes symlink' '
93
92
git checkout -f foo-becomes-binary &&
94
93
git diff-tree -p --binary HEAD foo-symlinked-to-bar > patch &&
95
94
git apply --index < patch
96
95
'
97
96
test_debug ' cat patch'
98
97
99
- test_expect_success SYMLINKS ' symlink becomes binary file' '
98
+ test_expect_success ' symlink becomes binary file' '
100
99
git checkout -f foo-symlinked-to-bar &&
101
100
git diff-tree -p --binary HEAD foo-becomes-binary > patch &&
102
101
git apply --index < patch
103
102
'
104
103
test_debug ' cat patch'
105
104
106
105
107
- test_expect_success SYMLINKS ' symlink becomes directory' '
106
+ test_expect_success ' symlink becomes directory' '
108
107
git checkout -f foo-symlinked-to-bar &&
109
108
git diff-tree -p HEAD foo-becomes-a-directory > patch &&
110
109
git apply --index < patch
111
110
'
112
111
test_debug ' cat patch'
113
112
114
113
115
- test_expect_success SYMLINKS ' directory becomes symlink' '
114
+ test_expect_success ' directory becomes symlink' '
116
115
git checkout -f foo-becomes-a-directory &&
117
116
git diff-tree -p HEAD foo-symlinked-to-bar > patch &&
118
117
git apply --index < patch
0 commit comments