Skip to content

Commit c5d1d13

Browse files
tgummerergitster
authored andcommitted
rerere: lowercase error messages
Documentation/CodingGuidelines mentions that error messages should be lowercase. Prior to marking them for translation follow that pattern in rerere as well, so translators won't have to translate messages that don't conform to our guidelines. Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent e69db0b commit c5d1d13

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

rerere.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -484,12 +484,12 @@ static int handle_file(const char *path, unsigned char *sha1, const char *output
484484
io.input = fopen(path, "r");
485485
io.io.wrerror = 0;
486486
if (!io.input)
487-
return error_errno("Could not open %s", path);
487+
return error_errno("could not open %s", path);
488488

489489
if (output) {
490490
io.io.output = fopen(output, "w");
491491
if (!io.io.output) {
492-
error_errno("Could not write %s", output);
492+
error_errno("could not write %s", output);
493493
fclose(io.input);
494494
return -1;
495495
}
@@ -499,15 +499,15 @@ static int handle_file(const char *path, unsigned char *sha1, const char *output
499499

500500
fclose(io.input);
501501
if (io.io.wrerror)
502-
error("There were errors while writing %s (%s)",
502+
error("there were errors while writing %s (%s)",
503503
path, strerror(io.io.wrerror));
504504
if (io.io.output && fclose(io.io.output))
505-
io.io.wrerror = error_errno("Failed to flush %s", path);
505+
io.io.wrerror = error_errno("failed to flush %s", path);
506506

507507
if (hunk_no < 0) {
508508
if (output)
509509
unlink_or_warn(output);
510-
return error("Could not parse conflict hunks in %s", path);
510+
return error("could not parse conflict hunks in %s", path);
511511
}
512512
if (io.io.wrerror)
513513
return -1;
@@ -690,11 +690,11 @@ static int merge(const struct rerere_id *id, const char *path)
690690
/* Update "path" with the resolution */
691691
f = fopen(path, "w");
692692
if (!f)
693-
return error_errno("Could not open %s", path);
693+
return error_errno("could not open %s", path);
694694
if (fwrite(result.ptr, result.size, 1, f) != 1)
695-
error_errno("Could not write %s", path);
695+
error_errno("could not write %s", path);
696696
if (fclose(f))
697-
return error_errno("Writing %s failed", path);
697+
return error_errno("writing %s failed", path);
698698

699699
out:
700700
free(cur.ptr);
@@ -720,7 +720,7 @@ static void update_paths(struct string_list *update)
720720

721721
if (write_locked_index(&the_index, &index_lock,
722722
COMMIT_LOCK | SKIP_IF_UNCHANGED))
723-
die("Unable to write new index file");
723+
die("unable to write new index file");
724724
}
725725

726726
static void remove_variant(struct rerere_id *id)
@@ -878,7 +878,7 @@ static int is_rerere_enabled(void)
878878
return rr_cache_exists;
879879

880880
if (!rr_cache_exists && mkdir_in_gitdir(git_path_rr_cache()))
881-
die("Could not create directory %s", git_path_rr_cache());
881+
die("could not create directory %s", git_path_rr_cache());
882882
return 1;
883883
}
884884

@@ -1031,7 +1031,7 @@ static int rerere_forget_one_path(const char *path, struct string_list *rr)
10311031
*/
10321032
ret = handle_cache(path, sha1, NULL);
10331033
if (ret < 1)
1034-
return error("Could not parse conflict hunks in '%s'", path);
1034+
return error("could not parse conflict hunks in '%s'", path);
10351035

10361036
/* Nuke the recorded resolution for the conflict */
10371037
id = new_rerere_id(sha1);
@@ -1049,7 +1049,7 @@ static int rerere_forget_one_path(const char *path, struct string_list *rr)
10491049
handle_cache(path, sha1, rerere_path(id, "thisimage"));
10501050
if (read_mmfile(&cur, rerere_path(id, "thisimage"))) {
10511051
free(cur.ptr);
1052-
error("Failed to update conflicted state in '%s'", path);
1052+
error("failed to update conflicted state in '%s'", path);
10531053
goto fail_exit;
10541054
}
10551055
cleanly_resolved = !try_merge(id, path, &cur, &result);

0 commit comments

Comments
 (0)