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>
Thomas Gummerer committed
Jul 14, 2018 at 22:44 UTC
c5d1d13239ecd0d3ec93796a196f5ff0513a7c03
1 file changed
+12
-12
rerere.c
+12
-12
@@ -484,12 +484,12 @@ static int handle_file(const char *path, unsigned char *sha1, const char *output
484
io.input = fopen(path, "r");
485
io.io.wrerror = 0;
486
if (!io.input)
487
- return error_errno("Could not open %s", path);
487
+ return error_errno("could not open %s", path);
488
489
if (output) {
490
io.io.output = fopen(output, "w");
491
if (!io.io.output) {
492
- error_errno("Could not write %s", output);
492
+ error_errno("could not write %s", output);
493
fclose(io.input);
494
return -1;
495
}
@@ -499,15 +499,15 @@ static int handle_file(const char *path, unsigned char *sha1, const char *output
499
500
fclose(io.input);
501
if (io.io.wrerror)
502
- error("There were errors while writing %s (%s)",
502
+ error("there were errors while writing %s (%s)",
503
path, strerror(io.io.wrerror));
504
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);
506
507
if (hunk_no < 0) {
508
if (output)
509
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);
511
}
512
if (io.io.wrerror)
513
return -1;
@@ -690,11 +690,11 @@ static int merge(const struct rerere_id *id, const char *path)
690
/* Update "path" with the resolution */
691
f = fopen(path, "w");
692
if (!f)
693
- return error_errno("Could not open %s", path);
693
+ return error_errno("could not open %s", path);
694
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);
696
if (fclose(f))
697
- return error_errno("Writing %s failed", path);
697
+ return error_errno("writing %s failed", path);
698
699
out:
700
free(cur.ptr);
@@ -720,7 +720,7 @@ static void update_paths(struct string_list *update)
720
721
if (write_locked_index(&the_index, &index_lock,
722
COMMIT_LOCK | SKIP_IF_UNCHANGED))
723
- die("Unable to write new index file");
723
+ die("unable to write new index file");
724
}
725
726
static void remove_variant(struct rerere_id *id)
@@ -878,7 +878,7 @@ static int is_rerere_enabled(void)
878
return rr_cache_exists;
879
880
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());
882
return 1;
883
}
884
@@ -1031,7 +1031,7 @@ static int rerere_forget_one_path(const char *path, struct string_list *rr)
1031
*/
1032
ret = handle_cache(path, sha1, NULL);
1033
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);
1035
1036
/* Nuke the recorded resolution for the conflict */
1037
id = new_rerere_id(sha1);
@@ -1049,7 +1049,7 @@ static int rerere_forget_one_path(const char *path, struct string_list *rr)
1049
handle_cache(path, sha1, rerere_path(id, "thisimage"));
1050
if (read_mmfile(&cur, rerere_path(id, "thisimage"))) {
1051
free(cur.ptr);
1052
- error("Failed to update conflicted state in '%s'", path);
1052
+ error("failed to update conflicted state in '%s'", path);
1053
goto fail_exit;
1054
}
1055
cleanly_resolved = !try_merge(id, path, &cur, &result);