@@ -150,20 +150,22 @@ test_expect_success 'setup submodule' '
150
150
151
151
git checkout -f master &&
152
152
mkdir sub &&
153
- cd sub &&
154
- git init &&
155
- echo test file > file &&
156
- git add file &&
157
- git commit -m sub_initial &&
158
- cd .. &&
153
+ (
154
+ cd sub &&
155
+ git init &&
156
+ echo test file > file &&
157
+ git add file &&
158
+ git commit -m sub_initial
159
+ ) &&
159
160
git submodule add "`pwd`/sub" sub &&
160
161
git commit -m initial &&
161
162
test_tick &&
162
- cd sub &&
163
- echo more data >> file &&
164
- git add file &&
165
- git commit -m sub_second &&
166
- cd .. &&
163
+ (
164
+ cd sub &&
165
+ echo more data >> file &&
166
+ git add file &&
167
+ git commit -m sub_second
168
+ ) &&
167
169
git add sub &&
168
170
git commit -m second
169
171
@@ -264,19 +266,20 @@ test_expect_success 'cope with tagger-less tags' '
264
266
265
267
test_expect_success ' setup for limiting exports by PATH' '
266
268
mkdir limit-by-paths &&
267
- cd limit-by-paths &&
268
- git init &&
269
- echo hi > there &&
270
- git add there &&
271
- git commit -m "First file" &&
272
- echo foo > bar &&
273
- git add bar &&
274
- git commit -m "Second file" &&
275
- git tag -a -m msg mytag &&
276
- echo morefoo >> bar &&
277
- git add bar &&
278
- git commit -m "Change to second file" &&
279
- cd ..
269
+ (
270
+ cd limit-by-paths &&
271
+ git init &&
272
+ echo hi > there &&
273
+ git add there &&
274
+ git commit -m "First file" &&
275
+ echo foo > bar &&
276
+ git add bar &&
277
+ git commit -m "Second file" &&
278
+ git tag -a -m msg mytag &&
279
+ echo morefoo >> bar &&
280
+ git add bar &&
281
+ git commit -m "Change to second file"
282
+ )
280
283
'
281
284
282
285
cat > limit-by-paths/expected << EOF
@@ -297,10 +300,11 @@ M 100644 :1 there
297
300
EOF
298
301
299
302
test_expect_success ' dropping tag of filtered out object' '
303
+ (
300
304
cd limit-by-paths &&
301
305
git fast-export --tag-of-filtered-object=drop mytag -- there > output &&
302
- test_cmp output expected &&
303
- cd ..
306
+ test_cmp output expected
307
+ )
304
308
'
305
309
306
310
cat >> limit-by-paths/expected << EOF
@@ -313,10 +317,11 @@ msg
313
317
EOF
314
318
315
319
test_expect_success ' rewriting tag of filtered out object' '
320
+ (
316
321
cd limit-by-paths &&
317
322
git fast-export --tag-of-filtered-object=rewrite mytag -- there > output &&
318
- test_cmp output expected &&
319
- cd ..
323
+ test_cmp output expected
324
+ )
320
325
'
321
326
322
327
cat > limit-by-paths/expected << EOF
@@ -343,13 +348,13 @@ M 100644 :2 there
343
348
EOF
344
349
345
350
test_expect_failure ' no exact-ref revisions included' '
346
- cd limit-by-paths &&
347
- git fast-export master~2..master~1 > output &&
348
- test_cmp output expected &&
349
- cd ..
351
+ (
352
+ cd limit-by-paths &&
353
+ git fast-export master~2..master~1 > output &&
354
+ test_cmp output expected
355
+ )
350
356
'
351
357
352
-
353
358
test_expect_success ' set-up a few more tags for tag export tests' '
354
359
git checkout -f master &&
355
360
HEAD_TREE=`git show -s --pretty=raw HEAD | grep tree | sed "s/tree //"` &&
0 commit comments