Skip to content

Commit 5f8c882

Browse files
committed
merge-base, ls-remote, ls-tree: fix error message formatting
The CodingGuidelines state that error messages should not begin with a capital letter and should not end with a full stop. Fix the die() messages in builtin/merge-base.c, builtin/ls-remote.c, and builtin/ls-tree.c that violate these rules. Signed-off-by: Md Ferdous Alam <mdferdousalam1989@yahoo.com>
1 parent 7c02d39 commit 5f8c882

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

builtin/ls-remote.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ int cmd_ls_remote(int argc,
128128
if (!remote) {
129129
if (dest)
130130
die("bad repository '%s'", dest);
131-
die("No remote configured to list refs from.");
131+
die("no remote configured to list refs from");
132132
}
133133

134134
if (get_url) {

builtin/ls-tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ int cmd_ls_tree(int argc,
406406
usage_with_options(ls_tree_usage, ls_tree_options);
407407
if (repo_get_oid_with_flags(the_repository, argv[0], &oid,
408408
GET_OID_HASH_ANY))
409-
die("Not a valid object name %s", argv[0]);
409+
die("not a valid object name %s", argv[0]);
410410

411411
/*
412412
* show_recursive() rolls its own matching code and is

builtin/merge-base.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ static struct commit *get_commit_reference(const char *arg)
4747
struct commit *r;
4848

4949
if (repo_get_oid(the_repository, arg, &revkey))
50-
die("Not a valid object name %s", arg);
50+
die("not a valid object name %s", arg);
5151
r = lookup_commit_reference(the_repository, &revkey);
5252
if (!r)
53-
die("Not a valid commit name %s", arg);
53+
die("not a valid commit name %s", arg);
5454

5555
return r;
5656
}
@@ -131,7 +131,7 @@ static int handle_fork_point(int argc, const char **argv)
131131

132132
commitname = (argc == 2) ? argv[1] : "HEAD";
133133
if (repo_get_oid(the_repository, commitname, &oid))
134-
die("Not a valid object name: '%s'", commitname);
134+
die("not a valid object name: '%s'", commitname);
135135

136136
derived = lookup_commit_reference(the_repository, &oid);
137137

0 commit comments

Comments
 (0)