119
test "z$head" = "z$branch"'
120
121
test_expect_success "fetch test followRemoteHEAD never" '
122
- test_when_finished "git config unset remote.origin.followRemoteHEAD" &&
122
+ test_when_finished "git -C \"$D/two\" config unset remote.origin.followRemoteHEAD" &&
123
(
124
cd "$D" &&
125
cd two &&
134
'
135
136
test_expect_success "fetch test followRemoteHEAD warn no change" '
137
- test_when_finished "git config unset remote.origin.followRemoteHEAD" &&
137
+ test_when_finished "git -C \"$D/two\" config unset remote.origin.followRemoteHEAD" &&
138
(
139
cd "$D" &&
140
cd two &&
154
'
155
156
test_expect_success "fetch test followRemoteHEAD warn create" '
157
- test_when_finished "git config unset remote.origin.followRemoteHEAD" &&
157
+ test_when_finished "git -C \"$D/two\" config unset remote.origin.followRemoteHEAD" &&
158
(
159
cd "$D" &&
160
cd two &&
170
'
171
172
test_expect_success "fetch test followRemoteHEAD warn detached" '
173
- test_when_finished "git config unset remote.origin.followRemoteHEAD" &&
173
+ test_when_finished "git -C \"$D/two\" config unset remote.origin.followRemoteHEAD" &&
174
(
175
cd "$D" &&
176
cd two &&
187
'
188
189
test_expect_success "fetch test followRemoteHEAD warn quiet" '
190
- test_when_finished "git config unset remote.origin.followRemoteHEAD" &&
190
+ test_when_finished "git -C \"$D/two\" config unset remote.origin.followRemoteHEAD" &&
191
(
192
cd "$D" &&
193
cd two &&
205
'
206
207
test_expect_success "fetch test followRemoteHEAD warn-if-not-branch branch is same" '
208
- test_when_finished "git config unset remote.origin.followRemoteHEAD" &&
208
+ test_when_finished "git -C \"$D/two\" config unset remote.origin.followRemoteHEAD" &&
209
(
210
cd "$D" &&
211
cd two &&
223
'
224
225
test_expect_success "fetch test followRemoteHEAD warn-if-not-branch branch is different" '
226
- test_when_finished "git config unset remote.origin.followRemoteHEAD" &&
226
+ test_when_finished "git -C \"$D/two\" config unset remote.origin.followRemoteHEAD" &&
227
(
228
cd "$D" &&
229
cd two &&
243
'
244
245
test_expect_success "fetch test followRemoteHEAD always" '
246
- test_when_finished "git config unset remote.origin.followRemoteHEAD" &&
246
+ test_when_finished "git -C \"$D/two\" config unset remote.origin.followRemoteHEAD" &&
247
(
248
cd "$D" &&
249
cd two &&
260
'
261
262
test_expect_success 'followRemoteHEAD does not kick in with refspecs' '
263
- test_when_finished "git config unset remote.origin.followRemoteHEAD" &&
263
+ test_when_finished "git -C \"$D/two\" config unset remote.origin.followRemoteHEAD" &&
264
(
265
cd "$D" &&
266
cd two &&