Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed die() errors' into lowercase (issue#635) #1865

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1058,11 +1058,11 @@ struct commit *get_fork_point(const char *refname, struct commit *commit)
switch (repo_dwim_ref(the_repository, refname, strlen(refname), &oid,
&full_refname, 0)) {
case 0:
die("No such ref: '%s'", refname);
die("no such ref: '%s'", refname);
case 1:
break; /* good */
default:
die("Ambiguous refname: '%s'", refname);
die("ambiguous refname: '%s'", refname);
}

memset(&revs, 0, sizeof(revs));
Expand Down Expand Up @@ -1343,14 +1343,14 @@ void verify_merge_signature(struct commit *commit, int verbosity,
switch (signature_check.result) {
case 'G':
if (ret || (check_trust && signature_check.trust_level < TRUST_MARGINAL))
die(_("Commit %s has an untrusted GPG signature, "
die(_("commit %s has an untrusted GPG signature, "
"allegedly by %s."), hex, signature_check.signer);
break;
case 'B':
die(_("Commit %s has a bad GPG signature "
die(_("commit %s has a bad GPG signature "
"allegedly by %s."), hex, signature_check.signer);
default: /* 'N' */
die(_("Commit %s does not have a GPG signature."), hex);
die(_("commit %s does not have a GPG signature."), hex);
}
if (verbosity >= 0 && signature_check.result == 'G')
printf(_("Commit %s has a good GPG signature by %s\n"),
Expand Down
2 changes: 1 addition & 1 deletion connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static NORETURN void die_initial_contact(int unexpected)
if (unexpected)
die(_("the remote end hung up upon initial contact"));
else
die(_("Could not read from remote repository.\n\n"
die(_("could not read from remote repository.\n\n"
"Please make sure you have the correct access rights\n"
"and the repository exists."));
}
Expand Down
Binary file added contrib/.DS_Store
Binary file not shown.
10 changes: 5 additions & 5 deletions daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ static void enable_service(const char *name, int ena)
return;
}
}
die("No such service %s", name);
die("no such service %s", name);
}

static void make_service_overridable(const char *name, int ena)
Expand All @@ -521,7 +521,7 @@ static void make_service_overridable(const char *name, int ena)
return;
}
}
die("No such service %s", name);
die("no such service %s", name);
}

static void parse_host_and_port(char *hostport, char **host,
Expand All @@ -532,15 +532,15 @@ static void parse_host_and_port(char *hostport, char **host,

end = strchr(hostport, ']');
if (!end)
die("Invalid request ('[' without ']')");
die("invalid request ('[' without ']')");
*end = '\0';
*host = hostport + 1;
if (!end[1])
*port = NULL;
else if (end[1] == ':')
*port = end + 2;
else
die("Garbage after end of host part");
die("garbage after end of host part");
} else {
*host = hostport;
*port = strrchr(hostport, ':');
Expand Down Expand Up @@ -614,7 +614,7 @@ static char *parse_host_arg(struct hostinfo *hi, char *extra_args, int buflen)
extra_args = val + vallen;
}
if (extra_args < end && *extra_args)
die("Invalid request");
die("invalid request");
}

return extra_args;
Expand Down
8 changes: 4 additions & 4 deletions date.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ static time_t gm_time_t(timestamp_t time, int tz)

if (minutes > 0) {
if (unsigned_add_overflows(time, minutes * 60))
die("Timestamp+tz too large: %"PRItime" +%04d",
die("timestamp+tz too large: %"PRItime" +%04d",
time, tz);
} else if (time < -minutes * 60)
die("Timestamp before Unix epoch: %"PRItime" %04d", time, tz);
die("timestamp before Unix epoch: %"PRItime" %04d", time, tz);
time += minutes * 60;
if (date_overflows(time))
die("Timestamp too large for this system: %"PRItime, time);
die("timestamp too large for this system: %"PRItime, time);
return (time_t)time;
}

Expand Down Expand Up @@ -116,7 +116,7 @@ static int local_tzoffset(timestamp_t time)
struct tm tm;

if (date_overflows(time))
die("Timestamp too large for this system: %"PRItime, time);
die("timestamp too large for this system: %"PRItime, time);

return local_time_tzoffset((time_t)time, &tm);
}
Expand Down
4 changes: 2 additions & 2 deletions diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -5004,7 +5004,7 @@ int parse_long_opt(const char *opt, const char **argv,
return 0;
/* separate form: --option value */
if (!argv[1])
die("Option '--%s' requires a value", opt);
die("option '--%s' requires a value", opt);
*optarg = argv[1];
return 2;
}
Expand Down Expand Up @@ -5066,7 +5066,7 @@ static int parse_dirstat_opt(struct diff_options *options, const char *params)
{
struct strbuf errmsg = STRBUF_INIT;
if (parse_dirstat_params(options, params, &errmsg))
die(_("Failed to parse --dirstat/-X option parameter:\n%s"),
die(_("failed to parse --dirstat/-X option parameter:\n%s"),
errmsg.buf);
strbuf_release(&errmsg);
/*
Expand Down
2 changes: 1 addition & 1 deletion diffcore-rotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void diffcore_rotate(struct diff_options *opt)
if (q->nr <= i) {
/* we did not find the specified path */
if (opt->rotate_to_strict)
die(_("No such path '%s' in the diff"), opt->rotate_to);
die(_("no such path '%s' in the diff"), opt->rotate_to);
return;
}

Expand Down
8 changes: 4 additions & 4 deletions dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -3262,8 +3262,8 @@ char *git_url_basename(const char *repo, int is_bundle, int is_bare)
* without this check.
*/
if (end - start < 0)
die(_("No directory name could be guessed.\n"
"Please specify a directory on the command line"));
die(_("no directory name could be guessed.\n"
"please specify a directory on the command line"));

/*
* Strip trailing port number if we've got only a
Expand Down Expand Up @@ -3300,8 +3300,8 @@ char *git_url_basename(const char *repo, int is_bundle, int is_bare)
strip_suffix_mem(start, &len, is_bundle ? ".bundle" : ".git");

if (!len || (len == 1 && *start == '/'))
die(_("No directory name could be guessed.\n"
"Please specify a directory on the command line"));
die(_("no directory name could be guessed.\n"
"please specify a directory on the command line"));

if (is_bare)
dir = xstrfmt("%.*s.git", (int)len, start);
Expand Down
14 changes: 7 additions & 7 deletions fetch-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static void for_each_cached_alternate(struct fetch_negotiator *negotiator,

static void die_in_commit_graph_only(const struct object_id *oid)
{
die(_("You are attempting to fetch %s, which is in the commit graph file but not in the object database.\n"
die(_("you are attempting to fetch %s, which is in the commit graph file but not in the object database.\n"
"This is probably due to repo corruption.\n"
"If you are attempting to repair this repo corruption by refetching the missing object, use 'git fetch --refetch' with the missing object."),
oid_to_hex(oid));
Expand Down Expand Up @@ -1128,7 +1128,7 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args,
if (server_supports("shallow"))
print_verbose(args, _("Server supports %s"), "shallow");
else if (args->depth > 0 || is_repository_shallow(r))
die(_("Server does not support shallow clients"));
die(_("server does not support shallow clients"));
if (args->depth > 0 || args->deepen_since || args->deepen_not)
args->deepen = 1;
if (server_supports("multi_ack_detailed")) {
Expand Down Expand Up @@ -1188,18 +1188,18 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args,
print_verbose(args, _("Server supports %s"), "deepen-since");
deepen_since_ok = 1;
} else if (args->deepen_since)
die(_("Server does not support --shallow-since"));
die(_("server does not support --shallow-since"));
if (server_supports("deepen-not")) {
print_verbose(args, _("Server supports %s"), "deepen-not");
deepen_not_ok = 1;
} else if (args->deepen_not)
die(_("Server does not support --shallow-exclude"));
die(_("server does not support --shallow-exclude"));
if (server_supports("deepen-relative"))
print_verbose(args, _("Server supports %s"), "deepen-relative");
else if (args->deepen_relative)
die(_("Server does not support --deepen"));
die(_("server does not support --deepen"));
if (!server_supports_hash(the_hash_algo->name, NULL))
die(_("Server does not support this repository's object format"));
die(_("server does not support this repository's object format"));

mark_complete_and_common_ref(negotiator, args, &ref);
filter_refs(args, &ref, sought, nr_sought);
Expand Down Expand Up @@ -1378,7 +1378,7 @@ static int send_fetch_request(struct fetch_negotiator *negotiator, int fd_out,
if (server_supports_feature("fetch", "shallow", 0))
add_shallow_requests(&req_buf, args);
else if (is_repository_shallow(the_repository) || args->deepen)
die(_("Server does not support shallow requests"));
die(_("server does not support shallow requests"));

/* Add filter */
send_filter(args, &req_buf,
Expand Down
2 changes: 1 addition & 1 deletion fmt-merge-msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ int fmt_merge_msg(struct strbuf *in, struct strbuf *out,
"HEAD", RESOLVE_REF_READING, &head_oid,
NULL);
if (!current_branch)
die("No current branch");
die("no current branch");

if (opts->into_name)
current_branch = opts->into_name;
Expand Down
8 changes: 4 additions & 4 deletions fsck.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static enum fsck_msg_type parse_msg_type(const char *str)
else if (!strcmp(str, "ignore"))
return FSCK_IGNORE;
else
die("Unknown fsck message type: '%s'", str);
die("unknown fsck message type: '%s'", str);
}

int is_valid_msg_type(const char *msg_id, const char *msg_type)
Expand Down Expand Up @@ -160,7 +160,7 @@ void fsck_set_msg_type(struct fsck_options *options,
enum fsck_msg_type msg_type;

if (msg_id < 0)
die("Unhandled message id: %s", msg_id_str);
die("unhandled message id: %s", msg_id_str);

if (msg_id == FSCK_MSG_LARGE_PATHNAME) {
const char *colon = strchr(msg_type_str, ':');
Expand All @@ -175,7 +175,7 @@ void fsck_set_msg_type(struct fsck_options *options,
msg_type = parse_msg_type(msg_type_str);

if (msg_type != FSCK_ERROR && msg_id_info[msg_id].msg_type == FSCK_FATAL)
die("Cannot demote %s to %s", msg_id_str, msg_type_str);
die("cannot demote %s to %s", msg_id_str, msg_type_str);

fsck_set_msg_type_from_ids(options, msg_id, msg_type);
free(to_free);
Expand Down Expand Up @@ -212,7 +212,7 @@ void fsck_set_msg_types(struct fsck_options *options, const char *values)
}

if (equal == len)
die("Missing '=': '%s'", buf);
die("missing '=': '%s'", buf);

fsck_set_msg_type(options, buf, buf + equal + 1);
buf += len + 1;
Expand Down
2 changes: 1 addition & 1 deletion git-compat-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ static inline char *xstrdup_or_null(const char *str)
static inline size_t xsize_t(off_t len)
{
if (len < 0 || (uintmax_t) len > SIZE_MAX)
die("Cannot handle files this big");
die("cannot handle files this big");
return (size_t) len;
}

Expand Down
8 changes: 4 additions & 4 deletions grep.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ static void compile_pcre2_pattern(struct grep_pat *p, const struct grep_opt *opt
p->pcre2_general_context = pcre2_general_context_create(
pcre2_malloc, pcre2_free, NULL);
if (!p->pcre2_general_context)
die("Couldn't allocate PCRE2 general context");
die("couldn't allocate PCRE2 general context");

if (opt->ignore_case) {
if (!opt->ignore_locale && has_non_ascii(p->pattern)) {
Expand Down Expand Up @@ -347,7 +347,7 @@ static void compile_pcre2_pattern(struct grep_pat *p, const struct grep_opt *opt
if (p->pcre2_pattern) {
p->pcre2_match_data = pcre2_match_data_create_from_pattern(p->pcre2_pattern, p->pcre2_general_context);
if (!p->pcre2_match_data)
die("Couldn't allocate PCRE2 match data");
die("couldn't allocate PCRE2 match data");
} else {
pcre2_get_error_message(error, errbuf, sizeof(errbuf));
compile_regexp_failed(p, (const char *)&errbuf);
Expand All @@ -373,7 +373,7 @@ static void compile_pcre2_pattern(struct grep_pat *p, const struct grep_opt *opt
} else if (jitret) {
int need_clip = p->patternlen > 64;
int clip_len = need_clip ? 64 : p->patternlen;
die("Couldn't JIT the PCRE2 pattern '%.*s'%s, got '%d'%s",
die("couldn't JIT the PCRE2 pattern '%.*s'%s, got '%d'%s",
clip_len, p->pattern, need_clip ? "..." : "", jitret,
pcre2_jit_functional()
? "\nPerhaps prefix (*NO_JIT) to your pattern?"
Expand Down Expand Up @@ -1099,7 +1099,7 @@ static int match_expr_eval(struct grep_opt *opt, struct grep_expr *x,
icol, collect_hits);
break;
default:
die("Unexpected node type (internal error) %d", x->node);
die("unexpected node type (internal error) %d", x->node);
}
if (collect_hits)
x->hit |= h;
Expand Down
2 changes: 1 addition & 1 deletion help.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ char *help_unknown_cmd(const char *cmd)
QSORT(main_cmds.names, main_cmds.cnt, levenshtein_compare);

if (!main_cmds.cnt)
die(_("Uh oh. Your system reports no Git commands at all."));
die(_("uh oh, your system reports no Git commands at all."));

/* skip and count prefix matches */
for (n = 0; n < main_cmds.cnt && !main_cmds.names[n]->len; n++)
Expand Down
12 changes: 6 additions & 6 deletions http-backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static void send_local_file(struct strbuf *hdr, const char *the_type,
if (fd < 0)
not_found(hdr, "Cannot open '%s': %s", p, strerror(errno));
if (fstat(fd, &sb) < 0)
die_errno("Cannot stat '%s'", p);
die_errno("cannot stat '%s'", p);

hdr_int(hdr, content_length, sb.st_size);
hdr_str(hdr, content_type, the_type);
Expand All @@ -203,7 +203,7 @@ static void send_local_file(struct strbuf *hdr, const char *the_type,
for (;;) {
ssize_t n = xread(fd, buf, buf_alloc);
if (n < 0)
die_errno("Cannot read '%s'", p);
die_errno("cannot read '%s'", p);
if (!n)
break;
write_or_die(1, buf, n);
Expand Down Expand Up @@ -459,7 +459,7 @@ static void pipe_fixed_length(const char *prog_name, int out, size_t req_len)
size_t chunk_length = remaining_len > sizeof(buf) ? sizeof(buf) : remaining_len;
ssize_t n = xread(0, buf, chunk_length);
if (n < 0)
die_errno("Reading request failed");
die_errno("reading request failed");
write_to_child(out, buf, n, prog_name);
remaining_len -= n;
}
Expand Down Expand Up @@ -713,7 +713,7 @@ static char* getdir(void)
} else if (path && *path) {
return xstrdup(path);
} else
die("No GIT_PROJECT_ROOT or PATH_TRANSLATED from server");
die("no GIT_PROJECT_ROOT or PATH_TRANSLATED from server");
return NULL;
}

Expand Down Expand Up @@ -768,7 +768,7 @@ int cmd_main(int argc UNUSED, const char **argv UNUSED)
set_die_is_recursing_routine(die_webcgi_recursing);

if (!method)
die("No REQUEST_METHOD from server");
die("no REQUEST_METHOD from server");
if (!strcmp(method, "HEAD"))
method = "GET";
dir = getdir();
Expand All @@ -780,7 +780,7 @@ int cmd_main(int argc UNUSED, const char **argv UNUSED)
int ret;

if (regcomp(&re, c->pattern, REG_EXTENDED))
die("Bogus regex in service table: %s", c->pattern);
die("bogus regex in service table: %s", c->pattern);
ret = regexec(&re, dir, 1, out, 0);
regfree(&re);

Expand Down
2 changes: 1 addition & 1 deletion http-fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static void fetch_single_packfile(struct object_id *packfile_hash,
}
}
} else {
die("Unable to start request");
die("unable to start request");
}

if ((ret = finish_http_pack_request(preq)))
Expand Down
4 changes: 2 additions & 2 deletions http-push.c
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,7 @@ static void fetch_symref(const char *path, char **symref, struct object_id *oid)
const char *name;

if (http_get_strbuf(url, &buffer, NULL) != HTTP_OK)
die("Couldn't get %s for remote symref\n%s", url,
die("couldn't get %s for remote symref\n%s", url,
curl_errorstr);
free(url);

Expand Down Expand Up @@ -1779,7 +1779,7 @@ int cmd_main(int argc, const char **argv)
usage(http_push_usage);

if (delete_branch && rs.nr != 1)
die("You must specify only one branch name when deleting a remote branch");
die("you must specify only one branch name when deleting a remote branch");

setup_git_directory();

Expand Down
Loading
Loading