@@ -475,57 +475,57 @@ test_expect_success 'git cat-file blob master@{2005-05-26 23:42}:F (expect OTHER
475
475
476
476
test_expect_success ' given old value for missing pseudoref, do not create' '
477
477
test_must_fail git update-ref PSEUDOREF $A $B 2>err &&
478
- test_path_is_missing . git/ PSEUDOREF &&
478
+ test_must_fail git rev-parse PSEUDOREF &&
479
479
test_i18ngrep "could not read ref" err
480
480
'
481
481
482
482
test_expect_success ' create pseudoref' '
483
483
git update-ref PSEUDOREF $A &&
484
- test $A = $(cat . git/ PSEUDOREF)
484
+ test $A = $(git rev-parse PSEUDOREF)
485
485
'
486
486
487
487
test_expect_success ' overwrite pseudoref with no old value given' '
488
488
git update-ref PSEUDOREF $B &&
489
- test $B = $(cat . git/ PSEUDOREF)
489
+ test $B = $(git rev-parse PSEUDOREF)
490
490
'
491
491
492
492
test_expect_success ' overwrite pseudoref with correct old value' '
493
493
git update-ref PSEUDOREF $C $B &&
494
- test $C = $(cat . git/ PSEUDOREF)
494
+ test $C = $(git rev-parse PSEUDOREF)
495
495
'
496
496
497
497
test_expect_success ' do not overwrite pseudoref with wrong old value' '
498
498
test_must_fail git update-ref PSEUDOREF $D $E 2>err &&
499
- test $C = $(cat . git/ PSEUDOREF) &&
499
+ test $C = $(git rev-parse PSEUDOREF) &&
500
500
test_i18ngrep "unexpected object ID" err
501
501
'
502
502
503
503
test_expect_success ' delete pseudoref' '
504
504
git update-ref -d PSEUDOREF &&
505
- test_path_is_missing . git/ PSEUDOREF
505
+ test_must_fail git rev-parse PSEUDOREF
506
506
'
507
507
508
508
test_expect_success ' do not delete pseudoref with wrong old value' '
509
509
git update-ref PSEUDOREF $A &&
510
510
test_must_fail git update-ref -d PSEUDOREF $B 2>err &&
511
- test $A = $(cat . git/ PSEUDOREF) &&
511
+ test $A = $(git rev-parse PSEUDOREF) &&
512
512
test_i18ngrep "unexpected object ID" err
513
513
'
514
514
515
515
test_expect_success ' delete pseudoref with correct old value' '
516
516
git update-ref -d PSEUDOREF $A &&
517
- test_path_is_missing . git/ PSEUDOREF
517
+ test_must_fail git rev-parse PSEUDOREF
518
518
'
519
519
520
520
test_expect_success ' create pseudoref with old OID zero' '
521
521
git update-ref PSEUDOREF $A $Z &&
522
- test $A = $(cat . git/ PSEUDOREF)
522
+ test $A = $(git rev-parse PSEUDOREF)
523
523
'
524
524
525
525
test_expect_success ' do not overwrite pseudoref with old OID zero' '
526
526
test_when_finished git update-ref -d PSEUDOREF &&
527
527
test_must_fail git update-ref PSEUDOREF $B $Z 2>err &&
528
- test $A = $(cat . git/ PSEUDOREF) &&
528
+ test $A = $(git rev-parse PSEUDOREF) &&
529
529
test_i18ngrep "already exists" err
530
530
'
531
531
0 commit comments