@@ -367,33 +367,14 @@ test_expect_success 'validate object ID of a known tree' '
367
367
368
368
# Various types of objects
369
369
370
- # Some filesystems do not support symblic links; on such systems
371
- # some expected values are different
372
- if test_have_prereq SYMLINKS
373
- then
374
- expectfilter=cat
375
- expectedtree=087704a96baf1c2d1c869a8b084481e121c88b5b
376
- expectedptree1=21ae8269cacbe57ae09138dcc3a2887f904d02b3
377
- expectedptree2=3c5e5399f3a333eddecce7a9b9465b63f65f51e2
378
- else
379
- expectfilter=' grep -v sym'
380
- expectedtree=8e18edf7d7edcf4371a3ac6ae5f07c2641db7c46
381
- expectedptree1=cfb8591b2f65de8b8cc1020cd7d9e67e7793b325
382
- expectedptree2=ce580448f0148b985a513b693fdf7d802cacb44f
383
- fi
384
-
385
-
386
370
test_expect_success ' adding various types of objects with git update-index --add' '
387
371
mkdir path2 path3 path3/subp3 &&
388
372
paths="path0 path2/file2 path3/file3 path3/subp3/file3" &&
389
373
(
390
374
for p in $paths
391
375
do
392
376
echo "hello $p" >$p || exit 1
393
- if test_have_prereq SYMLINKS
394
- then
395
- ln -s "hello $p" ${p}sym || exit 1
396
- fi
377
+ test_ln_s_add "hello $p" ${p}sym || exit 1
397
378
done
398
379
) &&
399
380
find path* ! -type d -print | xargs git update-index --add
@@ -405,7 +386,7 @@ test_expect_success 'showing stage with git ls-files --stage' '
405
386
'
406
387
407
388
test_expect_success ' validate git ls-files output for a known tree' '
408
- $expectfilter >expected <<-\EOF &&
389
+ cat >expected <<-\EOF &&
409
390
100644 f87290f8eb2cbbea7857214459a0739927eab154 0 path0
410
391
120000 15a98433ae33114b085f3eb3bb03b832b3180a01 0 path0sym
411
392
100644 3feff949ed00a62d9f7af97c15cd8a30595e7ac7 0 path2/file2
@@ -423,14 +404,14 @@ test_expect_success 'writing tree out with git write-tree' '
423
404
'
424
405
425
406
test_expect_success ' validate object ID for a known tree' '
426
- test "$tree" = "$expectedtree"
407
+ test "$tree" = 087704a96baf1c2d1c869a8b084481e121c88b5b
427
408
'
428
409
429
410
test_expect_success ' showing tree with git ls-tree' '
430
411
git ls-tree $tree >current
431
412
'
432
413
433
- test_expect_success SYMLINKS ' git ls-tree output for a known tree' '
414
+ test_expect_success ' git ls-tree output for a known tree' '
434
415
cat >expected <<-\EOF &&
435
416
100644 blob f87290f8eb2cbbea7857214459a0739927eab154 path0
436
417
120000 blob 15a98433ae33114b085f3eb3bb03b832b3180a01 path0sym
@@ -447,7 +428,7 @@ test_expect_success 'showing tree with git ls-tree -r' '
447
428
'
448
429
449
430
test_expect_success ' git ls-tree -r output for a known tree' '
450
- $expectfilter >expected <<-\EOF &&
431
+ cat >expected <<-\EOF &&
451
432
100644 blob f87290f8eb2cbbea7857214459a0739927eab154 path0
452
433
120000 blob 15a98433ae33114b085f3eb3bb03b832b3180a01 path0sym
453
434
100644 blob 3feff949ed00a62d9f7af97c15cd8a30595e7ac7 path2/file2
@@ -465,7 +446,7 @@ test_expect_success 'showing tree with git ls-tree -r -t' '
465
446
git ls-tree -r -t $tree >current
466
447
'
467
448
468
- test_expect_success SYMLINKS ' git ls-tree -r output for a known tree' '
449
+ test_expect_success ' git ls-tree -r output for a known tree' '
469
450
cat >expected <<-\EOF &&
470
451
100644 blob f87290f8eb2cbbea7857214459a0739927eab154 path0
471
452
120000 blob 15a98433ae33114b085f3eb3bb03b832b3180a01 path0sym
@@ -487,15 +468,15 @@ test_expect_success 'writing partial tree out with git write-tree --prefix' '
487
468
'
488
469
489
470
test_expect_success ' validate object ID for a known tree' '
490
- test "$ptree" = "$expectedptree1"
471
+ test "$ptree" = 21ae8269cacbe57ae09138dcc3a2887f904d02b3
491
472
'
492
473
493
474
test_expect_success ' writing partial tree out with git write-tree --prefix' '
494
475
ptree=$(git write-tree --prefix=path3/subp3)
495
476
'
496
477
497
478
test_expect_success ' validate object ID for a known tree' '
498
- test "$ptree" = "$expectedptree2"
479
+ test "$ptree" = 3c5e5399f3a333eddecce7a9b9465b63f65f51e2
499
480
'
500
481
501
482
test_expect_success ' put invalid objects into the index' '
@@ -529,7 +510,7 @@ test_expect_success 'git read-tree followed by write-tree should be idempotent'
529
510
'
530
511
531
512
test_expect_success ' validate git diff-files output for a know cache/work tree state' '
532
- $expectfilter >expected <<\EOF &&
513
+ cat >expected <<\EOF &&
533
514
:100644 100644 f87290f8eb2cbbea7857214459a0739927eab154 0000000000000000000000000000000000000000 M path0
534
515
:120000 120000 15a98433ae33114b085f3eb3bb03b832b3180a01 0000000000000000000000000000000000000000 M path0sym
535
516
:100644 100644 3feff949ed00a62d9f7af97c15cd8a30595e7ac7 0000000000000000000000000000000000000000 M path2/file2
@@ -553,7 +534,7 @@ test_expect_success 'no diff after checkout and git update-index --refresh' '
553
534
'
554
535
555
536
# ###############################################################
556
- P=$expectedtree
537
+ P=087704a96baf1c2d1c869a8b084481e121c88b5b
557
538
558
539
test_expect_success ' git commit-tree records the correct tree in a commit' '
559
540
commit0=$(echo NO | git commit-tree $P) &&
0 commit comments