ref_transaction_commit(): do not capitalize error messages

Our convention is for error messages to start with a lower-case letter. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Haggerty committed May 23, 2015 at 01:34 UTC c2e0a718c66760efebf7b348aef48dc1f885bc2a
2 files changed +9 -9
refs.c
+2 -2
@@ -3922,7 +3922,7 @@ int ref_transaction_commit(struct ref_transaction *transaction,
3922 ? TRANSACTION_NAME_CONFLICT
3923 : TRANSACTION_GENERIC_ERROR;
3924 reason = strbuf_detach(err, NULL);
3925 - strbuf_addf(err, "Cannot lock ref '%s': %s",
3925 + strbuf_addf(err, "cannot lock ref '%s': %s",
3926 update->refname, reason);
3927 free(reason);
3928 goto cleanup;
@@ -3945,7 +3945,7 @@ int ref_transaction_commit(struct ref_transaction *transaction,
3945 * write_ref_to_lockfile():
3946 */
3947 update->lock = NULL;
3948 - strbuf_addf(err, "Cannot update the ref '%s'.",
3948 + strbuf_addf(err, "cannot update the ref '%s'.",
3949 update->refname);
3950 ret = TRANSACTION_GENERIC_ERROR;
3951 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 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 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 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 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 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 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 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 &&