@@ -24,8 +24,9 @@ parse_verify_pack_blob_oid () {
24
24
}
25
25
26
26
test_expect_success ' verify blob count in normal packfile' '
27
- git -C r1 ls-files -s file.1 file.2 file.3 file.4 file.5 |
28
- test_parse_ls_files_stage_oids |
27
+ git -C r1 ls-files -s file.1 file.2 file.3 file.4 file.5 \
28
+ >ls_files_result &&
29
+ test_parse_ls_files_stage_oids <ls_files_result |
29
30
sort >expected &&
30
31
31
32
git -C r1 pack-objects --revs --stdout >all.pack <<-EOF &&
@@ -123,8 +124,8 @@ test_expect_success 'setup r2' '
123
124
'
124
125
125
126
test_expect_success ' verify blob count in normal packfile' '
126
- git -C r2 ls-files -s large.1000 large.10000 |
127
- test_parse_ls_files_stage_oids |
127
+ git -C r2 ls-files -s large.1000 large.10000 >ls_files_result &&
128
+ test_parse_ls_files_stage_oids <ls_files_result |
128
129
sort >expected &&
129
130
130
131
git -C r2 pack-objects --revs --stdout >all.pack <<-EOF &&
@@ -161,8 +162,8 @@ test_expect_success 'verify blob:limit=1000' '
161
162
'
162
163
163
164
test_expect_success ' verify blob:limit=1001' '
164
- git -C r2 ls-files -s large.1000 |
165
- test_parse_ls_files_stage_oids |
165
+ git -C r2 ls-files -s large.1000 >ls_files_result &&
166
+ test_parse_ls_files_stage_oids <ls_files_result |
166
167
sort >expected &&
167
168
168
169
git -C r2 pack-objects --revs --stdout --filter=blob:limit=1001 >filter.pack <<-EOF &&
@@ -179,8 +180,8 @@ test_expect_success 'verify blob:limit=1001' '
179
180
'
180
181
181
182
test_expect_success ' verify blob:limit=10001' '
182
- git -C r2 ls-files -s large.1000 large.10000 |
183
- test_parse_ls_files_stage_oids |
183
+ git -C r2 ls-files -s large.1000 large.10000 >ls_files_result &&
184
+ test_parse_ls_files_stage_oids <ls_files_result |
184
185
sort >expected &&
185
186
186
187
git -C r2 pack-objects --revs --stdout --filter=blob:limit=10001 >filter.pack <<-EOF &&
@@ -197,8 +198,8 @@ test_expect_success 'verify blob:limit=10001' '
197
198
'
198
199
199
200
test_expect_success ' verify blob:limit=1k' '
200
- git -C r2 ls-files -s large.1000 |
201
- test_parse_ls_files_stage_oids |
201
+ git -C r2 ls-files -s large.1000 >ls_files_result &&
202
+ test_parse_ls_files_stage_oids <ls_files_result |
202
203
sort >expected &&
203
204
204
205
git -C r2 pack-objects --revs --stdout --filter=blob:limit=1k >filter.pack <<-EOF &&
@@ -215,8 +216,8 @@ test_expect_success 'verify blob:limit=1k' '
215
216
'
216
217
217
218
test_expect_success ' verify explicitly specifying oversized blob in input' '
218
- git -C r2 ls-files -s large.1000 large.10000 |
219
- test_parse_ls_files_stage_oids |
219
+ git -C r2 ls-files -s large.1000 large.10000 >ls_files_result &&
220
+ test_parse_ls_files_stage_oids <ls_files_result |
220
221
sort >expected &&
221
222
222
223
echo HEAD >objects &&
@@ -233,8 +234,8 @@ test_expect_success 'verify explicitly specifying oversized blob in input' '
233
234
'
234
235
235
236
test_expect_success ' verify blob:limit=1m' '
236
- git -C r2 ls-files -s large.1000 large.10000 |
237
- test_parse_ls_files_stage_oids |
237
+ git -C r2 ls-files -s large.1000 large.10000 >ls_files_result &&
238
+ test_parse_ls_files_stage_oids <ls_files_result |
238
239
sort >expected &&
239
240
240
241
git -C r2 pack-objects --revs --stdout --filter=blob:limit=1m >filter.pack <<-EOF &&
@@ -289,8 +290,9 @@ test_expect_success 'setup r3' '
289
290
'
290
291
291
292
test_expect_success ' verify blob count in normal packfile' '
292
- git -C r3 ls-files -s sparse1 sparse2 dir1/sparse1 dir1/sparse2 |
293
- test_parse_ls_files_stage_oids |
293
+ git -C r3 ls-files -s sparse1 sparse2 dir1/sparse1 dir1/sparse2 \
294
+ >ls_files_result &&
295
+ test_parse_ls_files_stage_oids <ls_files_result |
294
296
sort >expected &&
295
297
296
298
git -C r3 pack-objects --revs --stdout >all.pack <<-EOF &&
@@ -341,8 +343,9 @@ test_expect_success 'setup r4' '
341
343
'
342
344
343
345
test_expect_success ' verify blob count in normal packfile' '
344
- git -C r4 ls-files -s pattern sparse1 sparse2 dir1/sparse1 dir1/sparse2 |
345
- test_parse_ls_files_stage_oids |
346
+ git -C r4 ls-files -s pattern sparse1 sparse2 dir1/sparse1 dir1/sparse2 \
347
+ >ls_files_result &&
348
+ test_parse_ls_files_stage_oids <ls_files_result |
346
349
sort >expected &&
347
350
348
351
git -C r4 pack-objects --revs --stdout >all.pack <<-EOF &&
@@ -359,8 +362,8 @@ test_expect_success 'verify blob count in normal packfile' '
359
362
'
360
363
361
364
test_expect_success ' verify sparse:oid=OID' '
362
- git -C r4 ls-files -s dir1/sparse1 dir1/sparse2 |
363
- test_parse_ls_files_stage_oids |
365
+ git -C r4 ls-files -s dir1/sparse1 dir1/sparse2 >ls_files_result &&
366
+ test_parse_ls_files_stage_oids <ls_files_result |
364
367
sort >expected &&
365
368
366
369
git -C r4 ls-files -s pattern >staged &&
@@ -379,8 +382,8 @@ test_expect_success 'verify sparse:oid=OID' '
379
382
'
380
383
381
384
test_expect_success ' verify sparse:oid=oid-ish' '
382
- git -C r4 ls-files -s dir1/sparse1 dir1/sparse2 |
383
- test_parse_ls_files_stage_oids |
385
+ git -C r4 ls-files -s dir1/sparse1 dir1/sparse2 >ls_files_result &&
386
+ test_parse_ls_files_stage_oids <ls_files_result |
384
387
sort >expected &&
385
388
386
389
git -C r4 pack-objects --revs --stdout --filter=sparse:oid=main:pattern >filter.pack <<-EOF &&
@@ -400,8 +403,9 @@ test_expect_success 'verify sparse:oid=oid-ish' '
400
403
# This models previously omitted objects that we did not receive.
401
404
402
405
test_expect_success ' setup r1 - delete loose blobs' '
403
- git -C r1 ls-files -s file.1 file.2 file.3 file.4 file.5 |
404
- test_parse_ls_files_stage_oids |
406
+ git -C r1 ls-files -s file.1 file.2 file.3 file.4 file.5 \
407
+ >ls_files_result &&
408
+ test_parse_ls_files_stage_oids <ls_files_result |
405
409
sort >expected &&
406
410
407
411
for id in `cat expected | sed "s|..|&/|"`
0 commit comments