builtin/log: downcase the beginning of error messages

Also drop full-stop at the end of error messages, per Documentation/CodingGuidelines. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Feb 22, 2019 at 10:24 UTC bc208ae31417ea4fecad14edcdb8b6c7decb0c38
1 file changed +20 -20
builtin/log.c
+20 -20
@@ -513,7 +513,7 @@ static int show_blob_object(const struct object_id *oid, struct rev_info *rev, c
513 if (get_oid_with_context(the_repository, obj_name,
514 GET_OID_RECORD_PATH,
515 &oidc, &obj_context))
516 - die(_("Not a valid object name %s"), obj_name);
516 + die(_("not a valid object name %s"), obj_name);
517 if (!obj_context.path ||
518 !textconv_object(the_repository, obj_context.path,
519 obj_context.mode, &oidc, 1, &buf, &size)) {
@@ -537,7 +537,7 @@ static int show_tag_object(const struct object_id *oid, struct rev_info *rev)
537 int offset = 0;
538
539 if (!buf)
540 - return error(_("Could not read object %s"), oid_to_hex(oid));
540 + return error(_("could not read object %s"), oid_to_hex(oid));
541
542 assert(type == OBJ_TAG);
543 while (offset < size && buf[offset] != '\n') {
@@ -631,7 +631,7 @@ int cmd_show(int argc, const char **argv, const char *prefix)
631 break;
632 o = parse_object(the_repository, &t->tagged->oid);
633 if (!o)
634 - ret = error(_("Could not read object %s"),
634 + ret = error(_("could not read object %s"),
635 oid_to_hex(&t->tagged->oid));
636 objects[i].item = o;
637 i--;
@@ -656,7 +656,7 @@ int cmd_show(int argc, const char **argv, const char *prefix)
656 ret = cmd_log_walk(&rev);
657 break;
658 default:
659 - ret = error(_("Unknown type: %d"), o->type);
659 + ret = error(_("unknown type: %d"), o->type);
660 }
661 }
662 free(objects);
@@ -894,7 +894,7 @@ static int open_next_file(struct commit *commit, const char *subject,
894 printf("%s\n", filename.buf + outdir_offset);
895
896 if ((rev->diffopt.file = fopen(filename.buf, "w")) == NULL) {
897 - error_errno(_("Cannot open patch file %s"), filename.buf);
897 + error_errno(_("cannot open patch file %s"), filename.buf);
898 strbuf_release(&filename);
899 return -1;
900 }
@@ -911,7 +911,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids)
911 unsigned flags1, flags2;
912
913 if (rev->pending.nr != 2)
914 - die(_("Need exactly one range."));
914 + die(_("need exactly one range"));
915
916 o1 = rev->pending.objects[0].item;
917 o2 = rev->pending.objects[1].item;
@@ -921,7 +921,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids)
921 c2 = lookup_commit_reference(the_repository, &o2->oid);
922
923 if ((flags1 & UNINTERESTING) == (flags2 & UNINTERESTING))
924 - die(_("Not a range."));
924 + die(_("not a range"));
925
926 init_patch_ids(the_repository, ids);
927
@@ -1044,7 +1044,7 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout,
1044 struct commit *head = list[0];
1045
1046 if (!cmit_fmt_is_mail(rev->commit_format))
1047 - die(_("Cover letter needs email format"));
1047 + die(_("cover letter needs email format"));
1048
1049 committer = git_committer_info(0);
1050
@@ -1214,7 +1214,7 @@ static int output_directory_callback(const struct option *opt, const char *arg,
1214 const char **dir = (const char **)opt->value;
1215 BUG_ON_OPT_NEG(unset);
1216 if (*dir)
1217 - die(_("Two output directories?"));
1217 + die(_("two output directories?"));
1218 *dir = arg;
1219 return 0;
1220 }
@@ -1321,7 +1321,7 @@ static struct commit *get_base_commit(const char *base_commit,
1321 if (base_commit && strcmp(base_commit, "auto")) {
1322 base = lookup_commit_reference_by_name(base_commit);
1323 if (!base)
1324 - die(_("Unknown commit %s"), base_commit);
1324 + die(_("unknown commit %s"), base_commit);
1325 } else if ((base_commit && !strcmp(base_commit, "auto")) || base_auto) {
1326 struct branch *curr_branch = branch_get(NULL);
1327 const char *upstream = branch_get_upstream(curr_branch, NULL);
@@ -1331,18 +1331,18 @@ static struct commit *get_base_commit(const char *base_commit,
1331 struct object_id oid;
1332
1333 if (get_oid(upstream, &oid))
1334 - die(_("Failed to resolve '%s' as a valid ref."), upstream);
1334 + die(_("failed to resolve '%s' as a valid ref"), upstream);
1335 commit = lookup_commit_or_die(&oid, "upstream base");
1336 base_list = get_merge_bases_many(commit, total, list);
1337 /* There should be one and only one merge base. */
1338 if (!base_list || base_list->next)
1339 - die(_("Could not find exact merge base."));
1339 + die(_("could not find exact merge base"));
1340 base = base_list->item;
1341 free_commit_list(base_list);
1342 } else {
1343 - die(_("Failed to get upstream, if you want to record base commit automatically,\n"
1343 + die(_("failed to get upstream, if you want to record base commit automatically,\n"
1344 "please use git branch --set-upstream-to to track a remote branch.\n"
1345 - "Or you could specify base commit by --base=<base-commit-id> manually."));
1345 + "Or you could specify base commit by --base=<base-commit-id> manually"));
1346 }
1347 }
1348
@@ -1360,7 +1360,7 @@ static struct commit *get_base_commit(const char *base_commit,
1360 struct commit_list *merge_base;
1361 merge_base = get_merge_bases(rev[2 * i], rev[2 * i + 1]);
1362 if (!merge_base || merge_base->next)
1363 - die(_("Failed to find exact merge base"));
1363 + die(_("failed to find exact merge base"));
1364
1365 rev[i] = merge_base->item;
1366 }
@@ -1739,7 +1739,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
1739 if (use_stdout)
1740 die(_("standard output, or directory, which one?"));
1741 if (mkdir(output_directory, 0777) < 0 && errno != EEXIST)
1742 - die_errno(_("Could not create directory '%s'"),
1742 + die_errno(_("could not create directory '%s'"),
1743 output_directory);
1744 }
1745
@@ -1941,7 +1941,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
1941
1942 if (!use_stdout &&
1943 open_next_file(rev.numbered_files ? NULL : commit, NULL, &rev, quiet))
1944 - die(_("Failed to create output files"));
1944 + die(_("failed to create output files"));
1945 shown = log_tree_commit(&rev, commit);
1946 free_commit_buffer(the_repository->parsed_objects,
1947 commit);
@@ -2065,9 +2065,9 @@ int cmd_cherry(int argc, const char **argv, const char *prefix)
2065 revs.max_parents = 1;
2066
2067 if (add_pending_commit(head, &revs, 0))
2068 - die(_("Unknown commit %s"), head);
2068 + die(_("unknown commit %s"), head);
2069 if (add_pending_commit(upstream, &revs, UNINTERESTING))
2070 - die(_("Unknown commit %s"), upstream);
2070 + die(_("unknown commit %s"), upstream);
2071
2072 /* Don't say anything if head and upstream are the same. */
2073 if (revs.pending.nr == 2) {
@@ -2079,7 +2079,7 @@ int cmd_cherry(int argc, const char **argv, const char *prefix)
2079 get_patch_ids(&revs, &ids);
2080
2081 if (limit && add_pending_commit(limit, &revs, UNINTERESTING))
2082 - die(_("Unknown commit %s"), limit);
2082 + die(_("unknown commit %s"), limit);
2083
2084 /* reverse the list of commits */
2085 if (prepare_revision_walk(&revs))