@@ -14,7 +14,7 @@ Testing basic merge tool invocation'
14
14
# running mergetool
15
15
16
16
test_expect_success ' setup' '
17
- git config rerere.enabled true &&
17
+ test_config rerere.enabled true &&
18
18
echo master >file1 &&
19
19
echo master spaced >"spaced name" &&
20
20
echo master file11 >file11 &&
@@ -112,7 +112,7 @@ test_expect_success 'custom mergetool' '
112
112
'
113
113
114
114
test_expect_success ' mergetool crlf' '
115
- git config core.autocrlf true &&
115
+ test_config core.autocrlf true &&
116
116
git checkout -b test2 branch1 &&
117
117
test_must_fail git merge master >/dev/null 2>&1 &&
118
118
( yes "" | git mergetool file1 >/dev/null 2>&1 ) &&
@@ -129,7 +129,7 @@ test_expect_success 'mergetool crlf' '
129
129
git submodule update -N &&
130
130
test "$(cat submod/bar)" = "master submodule" &&
131
131
git commit -m "branch1 resolved with mergetool - autocrlf" &&
132
- git config core.autocrlf false &&
132
+ test_config core.autocrlf false &&
133
133
git reset --hard
134
134
'
135
135
@@ -176,7 +176,7 @@ test_expect_success 'mergetool skips autoresolved' '
176
176
test_expect_success ' mergetool merges all from subdir' '
177
177
(
178
178
cd subdir &&
179
- git config rerere.enabled false &&
179
+ test_config rerere.enabled false &&
180
180
test_must_fail git merge master &&
181
181
( yes "r" | git mergetool ../submod ) &&
182
182
( yes "d" "d" | git mergetool --no-prompt ) &&
@@ -190,7 +190,7 @@ test_expect_success 'mergetool merges all from subdir' '
190
190
'
191
191
192
192
test_expect_success ' mergetool skips resolved paths when rerere is active' '
193
- git config rerere.enabled true &&
193
+ test_config rerere.enabled true &&
194
194
rm -rf .git/rr-cache &&
195
195
git checkout -b test5 branch1 &&
196
196
git submodule update -N &&
@@ -204,7 +204,7 @@ test_expect_success 'mergetool skips resolved paths when rerere is active' '
204
204
'
205
205
206
206
test_expect_success ' conflicted stash sets up rerere' '
207
- git config rerere.enabled true &&
207
+ test_config rerere.enabled true &&
208
208
git checkout stash1 &&
209
209
echo "Conflicting stash content" >file11 &&
210
210
git stash &&
@@ -232,7 +232,7 @@ test_expect_success 'conflicted stash sets up rerere' '
232
232
233
233
test_expect_success ' mergetool takes partial path' '
234
234
git reset --hard &&
235
- git config rerere.enabled false &&
235
+ test_config rerere.enabled false &&
236
236
git checkout -b test12 branch1 &&
237
237
git submodule update -N &&
238
238
test_must_fail git merge master &&
@@ -505,14 +505,12 @@ test_expect_success 'file with no base' '
505
505
506
506
test_expect_success ' custom commands override built-ins' '
507
507
git checkout -b test14 branch1 &&
508
- git config mergetool.defaults.cmd "cat \"\$REMOTE\" >\"\$MERGED\"" &&
509
- git config mergetool.defaults.trustExitCode true &&
508
+ test_config mergetool.defaults.cmd "cat \"\$REMOTE\" >\"\$MERGED\"" &&
509
+ test_config mergetool.defaults.trustExitCode true &&
510
510
test_must_fail git merge master &&
511
511
git mergetool --no-prompt --tool defaults -- both &&
512
512
echo master both added >expected &&
513
513
test_cmp both expected &&
514
- git config --unset mergetool.defaults.cmd &&
515
- git config --unset mergetool.defaults.trustExitCode &&
516
514
git reset --hard master >/dev/null 2>&1
517
515
'
518
516
0 commit comments