Skip to content

Commit bc208ae

Browse files
committed
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 <[email protected]>
1 parent 35ee755 commit bc208ae

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

builtin/log.c

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ static int show_blob_object(const struct object_id *oid, struct rev_info *rev, c
513513
if (get_oid_with_context(the_repository, obj_name,
514514
GET_OID_RECORD_PATH,
515515
&oidc, &obj_context))
516-
die(_("Not a valid object name %s"), obj_name);
516+
die(_("not a valid object name %s"), obj_name);
517517
if (!obj_context.path ||
518518
!textconv_object(the_repository, obj_context.path,
519519
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)
537537
int offset = 0;
538538

539539
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));
541541

542542
assert(type == OBJ_TAG);
543543
while (offset < size && buf[offset] != '\n') {
@@ -631,7 +631,7 @@ int cmd_show(int argc, const char **argv, const char *prefix)
631631
break;
632632
o = parse_object(the_repository, &t->tagged->oid);
633633
if (!o)
634-
ret = error(_("Could not read object %s"),
634+
ret = error(_("could not read object %s"),
635635
oid_to_hex(&t->tagged->oid));
636636
objects[i].item = o;
637637
i--;
@@ -656,7 +656,7 @@ int cmd_show(int argc, const char **argv, const char *prefix)
656656
ret = cmd_log_walk(&rev);
657657
break;
658658
default:
659-
ret = error(_("Unknown type: %d"), o->type);
659+
ret = error(_("unknown type: %d"), o->type);
660660
}
661661
}
662662
free(objects);
@@ -894,7 +894,7 @@ static int open_next_file(struct commit *commit, const char *subject,
894894
printf("%s\n", filename.buf + outdir_offset);
895895

896896
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);
898898
strbuf_release(&filename);
899899
return -1;
900900
}
@@ -911,7 +911,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids)
911911
unsigned flags1, flags2;
912912

913913
if (rev->pending.nr != 2)
914-
die(_("Need exactly one range."));
914+
die(_("need exactly one range"));
915915

916916
o1 = rev->pending.objects[0].item;
917917
o2 = rev->pending.objects[1].item;
@@ -921,7 +921,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids)
921921
c2 = lookup_commit_reference(the_repository, &o2->oid);
922922

923923
if ((flags1 & UNINTERESTING) == (flags2 & UNINTERESTING))
924-
die(_("Not a range."));
924+
die(_("not a range"));
925925

926926
init_patch_ids(the_repository, ids);
927927

@@ -1044,7 +1044,7 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout,
10441044
struct commit *head = list[0];
10451045

10461046
if (!cmit_fmt_is_mail(rev->commit_format))
1047-
die(_("Cover letter needs email format"));
1047+
die(_("cover letter needs email format"));
10481048

10491049
committer = git_committer_info(0);
10501050

@@ -1214,7 +1214,7 @@ static int output_directory_callback(const struct option *opt, const char *arg,
12141214
const char **dir = (const char **)opt->value;
12151215
BUG_ON_OPT_NEG(unset);
12161216
if (*dir)
1217-
die(_("Two output directories?"));
1217+
die(_("two output directories?"));
12181218
*dir = arg;
12191219
return 0;
12201220
}
@@ -1321,7 +1321,7 @@ static struct commit *get_base_commit(const char *base_commit,
13211321
if (base_commit && strcmp(base_commit, "auto")) {
13221322
base = lookup_commit_reference_by_name(base_commit);
13231323
if (!base)
1324-
die(_("Unknown commit %s"), base_commit);
1324+
die(_("unknown commit %s"), base_commit);
13251325
} else if ((base_commit && !strcmp(base_commit, "auto")) || base_auto) {
13261326
struct branch *curr_branch = branch_get(NULL);
13271327
const char *upstream = branch_get_upstream(curr_branch, NULL);
@@ -1331,18 +1331,18 @@ static struct commit *get_base_commit(const char *base_commit,
13311331
struct object_id oid;
13321332

13331333
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);
13351335
commit = lookup_commit_or_die(&oid, "upstream base");
13361336
base_list = get_merge_bases_many(commit, total, list);
13371337
/* There should be one and only one merge base. */
13381338
if (!base_list || base_list->next)
1339-
die(_("Could not find exact merge base."));
1339+
die(_("could not find exact merge base"));
13401340
base = base_list->item;
13411341
free_commit_list(base_list);
13421342
} 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"
13441344
"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"));
13461346
}
13471347
}
13481348

@@ -1360,7 +1360,7 @@ static struct commit *get_base_commit(const char *base_commit,
13601360
struct commit_list *merge_base;
13611361
merge_base = get_merge_bases(rev[2 * i], rev[2 * i + 1]);
13621362
if (!merge_base || merge_base->next)
1363-
die(_("Failed to find exact merge base"));
1363+
die(_("failed to find exact merge base"));
13641364

13651365
rev[i] = merge_base->item;
13661366
}
@@ -1739,7 +1739,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
17391739
if (use_stdout)
17401740
die(_("standard output, or directory, which one?"));
17411741
if (mkdir(output_directory, 0777) < 0 && errno != EEXIST)
1742-
die_errno(_("Could not create directory '%s'"),
1742+
die_errno(_("could not create directory '%s'"),
17431743
output_directory);
17441744
}
17451745

@@ -1941,7 +1941,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
19411941

19421942
if (!use_stdout &&
19431943
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"));
19451945
shown = log_tree_commit(&rev, commit);
19461946
free_commit_buffer(the_repository->parsed_objects,
19471947
commit);
@@ -2065,9 +2065,9 @@ int cmd_cherry(int argc, const char **argv, const char *prefix)
20652065
revs.max_parents = 1;
20662066

20672067
if (add_pending_commit(head, &revs, 0))
2068-
die(_("Unknown commit %s"), head);
2068+
die(_("unknown commit %s"), head);
20692069
if (add_pending_commit(upstream, &revs, UNINTERESTING))
2070-
die(_("Unknown commit %s"), upstream);
2070+
die(_("unknown commit %s"), upstream);
20712071

20722072
/* Don't say anything if head and upstream are the same. */
20732073
if (revs.pending.nr == 2) {
@@ -2079,7 +2079,7 @@ int cmd_cherry(int argc, const char **argv, const char *prefix)
20792079
get_patch_ids(&revs, &ids);
20802080

20812081
if (limit && add_pending_commit(limit, &revs, UNINTERESTING))
2082-
die(_("Unknown commit %s"), limit);
2082+
die(_("unknown commit %s"), limit);
20832083

20842084
/* reverse the list of commits */
20852085
if (prepare_revision_walk(&revs))

0 commit comments

Comments
 (0)