Skip to content

Commit 24c5a27

Browse files
peffgitster
authored andcommitted
merge-ort: lowercase a few error messages
As noted in CodingGuidelines, error messages should not be capitalized. Fix up a few of these that were copied verbatim from merge-recursive to match our modern style. We'll likewise fix up the matching ones from merge-recursive. We care a bit less there, since the hope is that it will eventually go away. But besides being the right thing to do in the meantime, it is necessary for t6406 to pass both with and without GIT_TEST_MERGE_ALGORITHM set (one of our CI jobs sets it to "recursive", which will use the merge-recursive.c code). An alternative would be to use "grep -i" in the test to check the message, but it's nice for the test suite to be be more exact (we'd notice if the capitalization fix regressed). Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6eb0c0e commit 24c5a27

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

merge-ort.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2105,12 +2105,12 @@ static int handle_content_merge(struct merge_options *opt,
21052105
&result_buf);
21062106

21072107
if ((merge_status < 0) || !result_buf.ptr)
2108-
ret = error(_("Failed to execute internal merge"));
2108+
ret = error(_("failed to execute internal merge"));
21092109

21102110
if (!ret &&
21112111
write_object_file(result_buf.ptr, result_buf.size,
21122112
OBJ_BLOB, &result->oid))
2113-
ret = error(_("Unable to add %s to database"), path);
2113+
ret = error(_("unable to add %s to database"), path);
21142114

21152115
free(result_buf.ptr);
21162116
if (ret)

merge-recursive.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,12 +1383,12 @@ static int merge_mode_and_contents(struct merge_options *opt,
13831383
extra_marker_size);
13841384

13851385
if ((merge_status < 0) || !result_buf.ptr)
1386-
ret = err(opt, _("Failed to execute internal merge"));
1386+
ret = err(opt, _("failed to execute internal merge"));
13871387

13881388
if (!ret &&
13891389
write_object_file(result_buf.ptr, result_buf.size,
13901390
OBJ_BLOB, &result->blob.oid))
1391-
ret = err(opt, _("Unable to add %s to database"),
1391+
ret = err(opt, _("unable to add %s to database"),
13921392
a->path);
13931393

13941394
free(result_buf.ptr);

t/t6406-merge-attr.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ test_expect_success !WINDOWS 'custom merge driver that is killed with a signal'
180180
>./please-abort &&
181181
echo "* merge=custom" >.gitattributes &&
182182
test_must_fail git merge main 2>err &&
183-
grep "^error: Failed to execute internal merge" err &&
183+
grep "^error: failed to execute internal merge" err &&
184184
git ls-files -u >output &&
185185
git diff --name-only HEAD >>output &&
186186
test_must_be_empty output

0 commit comments

Comments
 (0)