ref_transaction_commit(): delete extra "the" from error message

While we are in the area, let's remove a superfluous definite article from the error message that is emitted when the reference cannot be locked. This improves how it reads and makes it a bit shorter. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>

Michael Haggerty committed May 11, 2015 at 17:25 UTC 3553944aa8ca05fef7c24c5aa98c7de4bb3167d5
2 files changed +8 -8
refs.c
+1 -1
@@ -3844,7 +3844,7 @@ int ref_transaction_commit(struct ref_transaction *transaction,
3844 ? TRANSACTION_NAME_CONFLICT
3845 : TRANSACTION_GENERIC_ERROR;
3846 reason = strbuf_detach(err, NULL);
3847 - strbuf_addf(err, "Cannot lock the ref '%s': %s",
3847 + strbuf_addf(err, "Cannot lock ref '%s': %s",
3848 update->refname, reason);
3849 free(reason);
3850 goto cleanup;
t/t1400-update-ref.sh
+7 -7
@@ -519,7 +519,7 @@ test_expect_success 'stdin create ref works with path with space to blob' '
519 test_expect_success 'stdin update ref fails with wrong old value' '
520 echo "update $c $m $m~1" >stdin &&
521 test_must_fail git update-ref --stdin <stdin 2>err &&
522 - grep "fatal: Cannot lock the ref '"'"'$c'"'"'" err &&
522 + grep "fatal: Cannot lock ref '"'"'$c'"'"'" err &&
523 test_must_fail git rev-parse --verify -q $c
524 '
525
@@ -555,7 +555,7 @@ test_expect_success 'stdin update ref works with right old value' '
555 test_expect_success 'stdin delete ref fails with wrong old value' '
556 echo "delete $a $m~1" >stdin &&
557 test_must_fail git update-ref --stdin <stdin 2>err &&
558 - grep "fatal: Cannot lock the ref '"'"'$a'"'"'" err &&
558 + grep "fatal: Cannot lock ref '"'"'$a'"'"'" err &&
559 git rev-parse $m >expect &&
560 git rev-parse $a >actual &&
561 test_cmp expect actual
@@ -688,7 +688,7 @@ test_expect_success 'stdin update refs fails with wrong old value' '
688 update $c ''
689 EOF
690 test_must_fail git update-ref --stdin <stdin 2>err &&
691 - grep "fatal: Cannot lock the ref '"'"'$c'"'"'" err &&
691 + grep "fatal: Cannot lock ref '"'"'$c'"'"'" err &&
692 git rev-parse $m >expect &&
693 git rev-parse $a >actual &&
694 test_cmp expect actual &&
@@ -883,7 +883,7 @@ test_expect_success 'stdin -z create ref works with path with space to blob' '
883 test_expect_success 'stdin -z update ref fails with wrong old value' '
884 printf $F "update $c" "$m" "$m~1" >stdin &&
885 test_must_fail git update-ref -z --stdin <stdin 2>err &&
886 - grep "fatal: Cannot lock the ref '"'"'$c'"'"'" err &&
886 + grep "fatal: Cannot lock ref '"'"'$c'"'"'" err &&
887 test_must_fail git rev-parse --verify -q $c
888 '
889
@@ -899,7 +899,7 @@ test_expect_success 'stdin -z create ref fails when ref exists' '
899 git rev-parse "$c" >expect &&
900 printf $F "create $c" "$m~1" >stdin &&
901 test_must_fail git update-ref -z --stdin <stdin 2>err &&
902 - grep "fatal: Cannot lock the ref '"'"'$c'"'"'" err &&
902 + grep "fatal: Cannot lock ref '"'"'$c'"'"'" err &&
903 git rev-parse "$c" >actual &&
904 test_cmp expect actual
905 '
@@ -930,7 +930,7 @@ test_expect_success 'stdin -z update ref works with right old value' '
930 test_expect_success 'stdin -z delete ref fails with wrong old value' '
931 printf $F "delete $a" "$m~1" >stdin &&
932 test_must_fail git update-ref -z --stdin <stdin 2>err &&
933 - grep "fatal: Cannot lock the ref '"'"'$a'"'"'" err &&
933 + grep "fatal: Cannot lock ref '"'"'$a'"'"'" err &&
934 git rev-parse $m >expect &&
935 git rev-parse $a >actual &&
936 test_cmp expect actual
@@ -1045,7 +1045,7 @@ test_expect_success 'stdin -z update refs fails with wrong old value' '
1045 git update-ref $c $m &&
1046 printf $F "update $a" "$m" "$m" "update $b" "$m" "$m" "update $c" "$m" "$Z" >stdin &&
1047 test_must_fail git update-ref -z --stdin <stdin 2>err &&
1048 - grep "fatal: Cannot lock the ref '"'"'$c'"'"'" err &&
1048 + grep "fatal: Cannot lock ref '"'"'$c'"'"'" err &&
1049 git rev-parse $m >expect &&
1050 git rev-parse $a >actual &&
1051 test_cmp expect actual &&