@@ -524,51 +524,51 @@ test_expect_success 'given old value for missing pseudoref, do not create' '
524
524
525
525
test_expect_success ' create pseudoref' '
526
526
git update-ref PSEUDOREF $A &&
527
- test $A = $(git rev-parse PSEUDOREF)
527
+ test $A = $(git show-ref -s --verify PSEUDOREF)
528
528
'
529
529
530
530
test_expect_success ' overwrite pseudoref with no old value given' '
531
531
git update-ref PSEUDOREF $B &&
532
- test $B = $(git rev-parse PSEUDOREF)
532
+ test $B = $(git show-ref -s --verify PSEUDOREF)
533
533
'
534
534
535
535
test_expect_success ' overwrite pseudoref with correct old value' '
536
536
git update-ref PSEUDOREF $C $B &&
537
- test $C = $(git rev-parse PSEUDOREF)
537
+ test $C = $(git show-ref -s --verify PSEUDOREF)
538
538
'
539
539
540
540
test_expect_success ' do not overwrite pseudoref with wrong old value' '
541
541
test_must_fail git update-ref PSEUDOREF $D $E 2>err &&
542
- test $C = $(git rev-parse PSEUDOREF) &&
542
+ test $C = $(git show-ref -s --verify PSEUDOREF) &&
543
543
test_grep "cannot lock ref.*expected" err
544
544
'
545
545
546
546
test_expect_success ' delete pseudoref' '
547
547
git update-ref -d PSEUDOREF &&
548
- test_must_fail git rev-parse PSEUDOREF
548
+ test_must_fail git show-ref -s --verify PSEUDOREF
549
549
'
550
550
551
551
test_expect_success ' do not delete pseudoref with wrong old value' '
552
552
git update-ref PSEUDOREF $A &&
553
553
test_must_fail git update-ref -d PSEUDOREF $B 2>err &&
554
- test $A = $(git rev-parse PSEUDOREF) &&
554
+ test $A = $(git show-ref -s --verify PSEUDOREF) &&
555
555
test_grep "cannot lock ref.*expected" err
556
556
'
557
557
558
558
test_expect_success ' delete pseudoref with correct old value' '
559
559
git update-ref -d PSEUDOREF $A &&
560
- test_must_fail git rev-parse PSEUDOREF
560
+ test_must_fail git show-ref -s --verify PSEUDOREF
561
561
'
562
562
563
563
test_expect_success ' create pseudoref with old OID zero' '
564
564
git update-ref PSEUDOREF $A $Z &&
565
- test $A = $(git rev-parse PSEUDOREF)
565
+ test $A = $(git show-ref -s --verify PSEUDOREF)
566
566
'
567
567
568
568
test_expect_success ' do not overwrite pseudoref with old OID zero' '
569
569
test_when_finished git update-ref -d PSEUDOREF &&
570
570
test_must_fail git update-ref PSEUDOREF $B $Z 2>err &&
571
- test $A = $(git rev-parse PSEUDOREF) &&
571
+ test $A = $(git show-ref -s --verify PSEUDOREF) &&
572
572
test_grep "already exists" err
573
573
'
574
574
0 commit comments