@@ -136,14 +136,6 @@ test_expect_success 'update-ref --no-deref -d can delete reference to bad ref' '
136
136
test_path_is_missing .git/refs/heads/ref-to-bad
137
137
'
138
138
139
- test_expect_success ' update-ref --no-deref -d can delete reference to broken name' '
140
- git symbolic-ref refs/heads/badname refs/heads/broken...ref &&
141
- test_when_finished "rm -f .git/refs/heads/badname" &&
142
- test_path_is_file .git/refs/heads/badname &&
143
- git update-ref --no-deref -d refs/heads/badname &&
144
- test_path_is_missing .git/refs/heads/badname
145
- '
146
-
147
139
test_expect_success ' (not) create HEAD with old sha1' "
148
140
test_must_fail git update-ref HEAD $A $B
149
141
"
@@ -408,12 +400,6 @@ test_expect_success 'stdin fails create with no ref' '
408
400
grep "fatal: create: missing <ref>" err
409
401
'
410
402
411
- test_expect_success ' stdin fails create with bad ref name' '
412
- echo "create ~a $m" >stdin &&
413
- test_must_fail git update-ref --stdin <stdin 2>err &&
414
- grep "fatal: invalid ref format: ~a" err
415
- '
416
-
417
403
test_expect_success ' stdin fails create with no new value' '
418
404
echo "create $a" >stdin &&
419
405
test_must_fail git update-ref --stdin <stdin 2>err &&
@@ -432,12 +418,6 @@ test_expect_success 'stdin fails update with no ref' '
432
418
grep "fatal: update: missing <ref>" err
433
419
'
434
420
435
- test_expect_success ' stdin fails update with bad ref name' '
436
- echo "update ~a $m" >stdin &&
437
- test_must_fail git update-ref --stdin <stdin 2>err &&
438
- grep "fatal: invalid ref format: ~a" err
439
- '
440
-
441
421
test_expect_success ' stdin fails update with no new value' '
442
422
echo "update $a" >stdin &&
443
423
test_must_fail git update-ref --stdin <stdin 2>err &&
@@ -456,12 +436,6 @@ test_expect_success 'stdin fails delete with no ref' '
456
436
grep "fatal: delete: missing <ref>" err
457
437
'
458
438
459
- test_expect_success ' stdin fails delete with bad ref name' '
460
- echo "delete ~a $m" >stdin &&
461
- test_must_fail git update-ref --stdin <stdin 2>err &&
462
- grep "fatal: invalid ref format: ~a" err
463
- '
464
-
465
439
test_expect_success ' stdin fails delete with too many arguments' '
466
440
echo "delete $a $m $m" >stdin &&
467
441
test_must_fail git update-ref --stdin <stdin 2>err &&
@@ -734,12 +708,6 @@ test_expect_success 'stdin -z fails create with no ref' '
734
708
grep "fatal: create: missing <ref>" err
735
709
'
736
710
737
- test_expect_success ' stdin -z fails create with bad ref name' '
738
- printf $F "create ~a " "$m" >stdin &&
739
- test_must_fail git update-ref -z --stdin <stdin 2>err &&
740
- grep "fatal: invalid ref format: ~a " err
741
- '
742
-
743
711
test_expect_success ' stdin -z fails create with no new value' '
744
712
printf $F "create $a" >stdin &&
745
713
test_must_fail git update-ref -z --stdin <stdin 2>err &&
@@ -764,12 +732,6 @@ test_expect_success 'stdin -z fails update with too few args' '
764
732
grep "fatal: update $a: unexpected end of input when reading <oldvalue>" err
765
733
'
766
734
767
- test_expect_success ' stdin -z fails update with bad ref name' '
768
- printf $F "update ~a" "$m" "" >stdin &&
769
- test_must_fail git update-ref -z --stdin <stdin 2>err &&
770
- grep "fatal: invalid ref format: ~a" err
771
- '
772
-
773
735
test_expect_success ' stdin -z emits warning with empty new value' '
774
736
git update-ref $a $m &&
775
737
printf $F "update $a" "" "" >stdin &&
@@ -802,12 +764,6 @@ test_expect_success 'stdin -z fails delete with no ref' '
802
764
grep "fatal: delete: missing <ref>" err
803
765
'
804
766
805
- test_expect_success ' stdin -z fails delete with bad ref name' '
806
- printf $F "delete ~a" "$m" >stdin &&
807
- test_must_fail git update-ref -z --stdin <stdin 2>err &&
808
- grep "fatal: invalid ref format: ~a" err
809
- '
810
-
811
767
test_expect_success ' stdin -z fails delete with no old value' '
812
768
printf $F "delete $a" >stdin &&
813
769
test_must_fail git update-ref -z --stdin <stdin 2>err &&
0 commit comments