t6038 (merge.renormalize): try checkout -m and cherry-pick
checkout -m and cherry-pick have not been wired up to respect merge.renormalize, but a naïve user would not know that. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder committed
Aug 5, 2010 at 06:11 UTC
d347cee4deda2e740f3c9e0046a86b46debdaeb8
1 file changed
+41
t/t6038-merge-text-auto.sh
+41
@@ -85,6 +85,47 @@ test_expect_success 'Merge addition of text=auto' '
85
test_cmp expected file
86
'
87
88
+test_expect_failure 'checkout -m after setting text=auto' '
89
+ cat <<-\EOF >expected &&
90
+ first line
91
+ same line
92
+ EOF
93
+
94
+ git rm -fr . &&
95
+ rm -f .gitattributes &&
96
+ git reset --hard initial &&
97
+ git checkout a -- . &&
98
+ git checkout -m b &&
99
+ test_cmp expected file
100
+'
101
+
102
+test_expect_failure 'checkout -m addition of text=auto' '
103
+ cat <<-\EOF >expected &&
104
+ first line
105
+ same line
106
+ EOF
107
+
108
+ git rm -fr . &&
109
+ rm -f .gitattributes file &&
110
+ git reset --hard initial &&
111
+ git checkout b -- . &&
112
+ git checkout -m a &&
113
+ test_cmp expected file
114
+'
115
+
116
+test_expect_failure 'cherry-pick patch from after text=auto was added' '
117
+ append_cr <<-\EOF >expected &&
118
+ first line
119
+ same line
120
+ EOF
121
+
122
+ git rm -fr . &&
123
+ git reset --hard b &&
124
+ test_must_fail git cherry-pick a >err 2>&1 &&
125
+ grep "[Nn]othing added" err &&
126
+ test_cmp expected file
127
+'
128
+
129
test_expect_success 'Test delete/normalize conflict' '
130
git checkout -f side &&
131
git rm -fr . &&