diff --git a/commit.c b/commit.c index 540660359d4190..5250809dda0d8e 100644 --- a/commit.c +++ b/commit.c @@ -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)); @@ -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"), diff --git a/connect.c b/connect.c index 91f399001449c8..b081d85f4312ac 100644 --- a/connect.c +++ b/connect.c @@ -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.")); } diff --git a/contrib/.DS_Store b/contrib/.DS_Store new file mode 100644 index 00000000000000..7c3f1724bf2f44 Binary files /dev/null and b/contrib/.DS_Store differ diff --git a/daemon.c b/daemon.c index d1be61fd578949..f6e71bd70f33ce 100644 --- a/daemon.c +++ b/daemon.c @@ -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) @@ -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, @@ -532,7 +532,7 @@ 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]) @@ -540,7 +540,7 @@ static void parse_host_and_port(char *hostport, char **host, 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, ':'); @@ -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; diff --git a/date.c b/date.c index 17a95077cf5450..67c1471c26971d 100644 --- a/date.c +++ b/date.c @@ -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; } @@ -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); } diff --git a/diff.c b/diff.c index 019fb893a7e751..82b981f17f863a 100644 --- a/diff.c +++ b/diff.c @@ -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; } @@ -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); /* diff --git a/diffcore-rotate.c b/diffcore-rotate.c index 67b591261adcc6..0289e43eabbc68 100644 --- a/diffcore-rotate.c +++ b/diffcore-rotate.c @@ -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; } diff --git a/dir.c b/dir.c index 16ccfe7e4e868d..a817858a233821 100644 --- a/dir.c +++ b/dir.c @@ -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 @@ -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); diff --git a/fetch-pack.c b/fetch-pack.c index 1ed5e11dd56857..053209e5d4124f 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -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)); @@ -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")) { @@ -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); @@ -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, diff --git a/fmt-merge-msg.c b/fmt-merge-msg.c index 5b63c3b088a17a..100ab13277fdc0 100644 --- a/fmt-merge-msg.c +++ b/fmt-merge-msg.c @@ -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; diff --git a/fsck.c b/fsck.c index 9fc4c25ffd59ba..85ffd8c4d767f3 100644 --- a/fsck.c +++ b/fsck.c @@ -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) @@ -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, ':'); @@ -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); @@ -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; diff --git a/git-compat-util.h b/git-compat-util.h index e123288e8f1393..81d641ed00b081 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -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; } diff --git a/grep.c b/grep.c index 4e155ee9e66367..a46099151c2d0a 100644 --- a/grep.c +++ b/grep.c @@ -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)) { @@ -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); @@ -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?" @@ -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; diff --git a/help.c b/help.c index 8d91afe851d1f7..76c51786d19ccc 100644 --- a/help.c +++ b/help.c @@ -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++) diff --git a/http-backend.c b/http-backend.c index 33cf3782826f6c..300e3877c49773 100644 --- a/http-backend.c +++ b/http-backend.c @@ -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); @@ -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); @@ -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; } @@ -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; } @@ -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(); @@ -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); diff --git a/http-fetch.c b/http-fetch.c index 02ab80533f0e34..7aff7b52cc5775 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -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))) diff --git a/http-push.c b/http-push.c index 1b030d96f48002..507b316cab95db 100644 --- a/http-push.c +++ b/http-push.c @@ -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); @@ -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(); diff --git a/http.c b/http.c index f4504133e88869..791132b5d065f8 100644 --- a/http.c +++ b/http.c @@ -1214,7 +1214,7 @@ static CURL *get_curl_handle(void) } if (!proxy_auth.host) - die("Invalid proxy URL '%s'", curl_http_proxy); + die("invalid proxy URL '%s'", curl_http_proxy); strbuf_addstr(&proxy, proxy_auth.host); if (proxy_auth.path) { @@ -1224,11 +1224,11 @@ static CURL *get_curl_handle(void) die("libcurl 7.84 or later is required to support paths in proxy URLs"); if (!starts_with(proxy_auth.protocol, "socks")) - die("Invalid proxy URL '%s': only SOCKS proxies support paths", + die("invalid proxy URL '%s': only SOCKS proxies support paths", curl_http_proxy); if (strcasecmp(proxy_auth.host, "localhost")) - die("Invalid proxy URL '%s': host must be localhost if a path is present", + die("invalid proxy URL '%s': host must be localhost if a path is present", curl_http_proxy); strbuf_addch(&proxy, '/'); @@ -1291,11 +1291,11 @@ void http_init(struct remote *remote, const char *url, int proactive_auth) strbuf_addf(&buf, "\n\t%s", backends[i]->name); die("%s", buf.buf); case CURLSSLSET_NO_BACKENDS: - die(_("Could not set SSL backend to '%s': " + die(_("could not set SSL backend to '%s': " "cURL was built without SSL backends"), http_ssl_backend); case CURLSSLSET_TOO_LATE: - die(_("Could not set SSL backend to '%s': already set"), + die(_("could not set SSL backend to '%s': already set"), http_ssl_backend); case CURLSSLSET_OK: break; /* Okay! */ diff --git a/imap-send.c b/imap-send.c index 6c8f84e836bb40..f3673871068970 100644 --- a/imap-send.c +++ b/imap-send.c @@ -889,7 +889,7 @@ static char *cram(const char *challenge_64 UNUSED, const char *user UNUSED, const char *pass UNUSED) { - die("If you want to use CRAM-MD5 authenticate method, " + die("if you want to use CRAM-MD5 authenticate method, " "you have to build git-imap-send with OpenSSL library."); } diff --git a/line-log.c b/line-log.c index 628e3fe3ae18dc..160723cd1c0fa7 100644 --- a/line-log.c +++ b/line-log.c @@ -487,9 +487,9 @@ static struct commit *check_single_commit(struct rev_info *revs) continue; obj = deref_tag(revs->repo, obj, NULL, 0); if (!obj || obj->type != OBJ_COMMIT) - die("Non commit %s?", revs->pending.objects[i].name); + die("non commit %s?", revs->pending.objects[i].name); if (commit) - die("More than one commit to dig from: %s and %s?", + die("more than one commit to dig from: %s and %s?", revs->pending.objects[i].name, revs->pending.objects[found].name); commit = obj; @@ -497,7 +497,7 @@ static struct commit *check_single_commit(struct rev_info *revs) } if (!commit) - die("No commit specified?"); + die("no commit specified?"); return (struct commit *) commit; } @@ -509,7 +509,7 @@ static void fill_blob_sha1(struct repository *r, struct commit *commit, struct object_id oid; if (get_tree_entry(r, &commit->object.oid, spec->path, &oid, &mode)) - die("There is no path %s in the commit", spec->path); + die("there is no path %s in the commit", spec->path); fill_filespec(spec, &oid, 1, mode); return; @@ -526,7 +526,7 @@ static void fill_line_ends(struct repository *r, char *data = NULL; if (diff_populate_filespec(r, spec, NULL)) - die("Cannot read blob %s", oid_to_hex(&spec->oid)); + die("cannot read blob %s", oid_to_hex(&spec->oid)); ALLOC_ARRAY(ends, size); ends[cur++] = 0; diff --git a/notes-merge.c b/notes-merge.c index 8d701ed428aa62..d59096e84fadcf 100644 --- a/notes-merge.c +++ b/notes-merge.c @@ -283,14 +283,14 @@ static void check_notes_merge_worktree(struct notes_merge_options *o) if (file_exists(git_path(NOTES_MERGE_WORKTREE)) && !is_empty_dir(git_path(NOTES_MERGE_WORKTREE))) { if (advice_enabled(ADVICE_RESOLVE_CONFLICT)) - die(_("You have not concluded your previous " + die(_("you have not concluded your previous " "notes merge (%s exists).\nPlease, use " "'git notes merge --commit' or 'git notes " "merge --abort' to commit/abort the " "previous merge before you start a new " "notes merge."), git_path("NOTES_MERGE_*")); else - die(_("You have not concluded your notes merge " + die(_("you have not concluded your notes merge " "(%s exists)."), git_path("NOTES_MERGE_*")); } @@ -371,7 +371,7 @@ static int ll_merge_in_worktree(struct notes_merge_options *o, warning("Cannot merge binary files: %s (%s vs. %s)", oid_to_hex(&p->obj), o->local_ref, o->remote_ref); if ((status < 0) || !result_buf.ptr) - die("Failed to execute internal merge"); + die("failed to execute internal merge"); write_buf_to_worktree(&p->obj, result_buf.ptr, result_buf.size); free(result_buf.ptr); @@ -479,7 +479,7 @@ static int merge_one_change(struct notes_merge_options *o, "(combine_notes_cat_sort_uniq)"); return 0; } - die("Unknown strategy (%i).", o->strategy); + die("unknown strategy (%i).", o->strategy); } static int merge_changes(struct notes_merge_options *o, @@ -566,12 +566,12 @@ int notes_merge(struct notes_merge_options *o, /* Dereference o->local_ref into local_sha1 */ if (refs_read_ref_full(get_main_ref_store(the_repository), o->local_ref, 0, &local_oid, NULL)) - die("Failed to resolve local notes ref '%s'", o->local_ref); + die("failed to resolve local notes ref '%s'", o->local_ref); else if (!check_refname_format(o->local_ref, 0) && is_null_oid(&local_oid)) local = NULL; /* local_oid == null_oid indicates unborn ref */ else if (!(local = lookup_commit_reference(o->repo, &local_oid))) - die("Could not parse local commit %s (%s)", + die("could not parse local commit %s (%s)", oid_to_hex(&local_oid), o->local_ref); trace_printf("\tlocal commit: %.7s\n", oid_to_hex(&local_oid)); @@ -585,17 +585,17 @@ int notes_merge(struct notes_merge_options *o, oidclr(&remote_oid, the_repository->hash_algo); remote = NULL; } else { - die("Failed to resolve remote notes ref '%s'", + die("failed to resolve remote notes ref '%s'", o->remote_ref); } } else if (!(remote = lookup_commit_reference(o->repo, &remote_oid))) { - die("Could not parse remote commit %s (%s)", + die("could not parse remote commit %s (%s)", oid_to_hex(&remote_oid), o->remote_ref); } trace_printf("\tremote commit: %.7s\n", oid_to_hex(&remote_oid)); if (!local && !remote) - die("Cannot merge empty notes ref (%s) into empty notes ref " + die("cannot merge empty notes ref (%s) into empty notes ref " "(%s)", o->remote_ref, o->local_ref); if (!local) { /* result == remote commit */ @@ -724,11 +724,11 @@ int notes_merge_commit(struct notes_merge_options *o, strbuf_addstr(&path, e->d_name); /* write file as blob, and add to partial_tree */ if (stat(path.buf, &st)) - die_errno("Failed to stat '%s'", path.buf); + die_errno("failed to stat '%s'", path.buf); if (index_path(o->repo->index, &blob_oid, path.buf, &st, HASH_WRITE_OBJECT)) - die("Failed to write blob object from '%s'", path.buf); + die("failed to write blob object from '%s'", path.buf); if (add_note(partial_tree, &obj_oid, &blob_oid, NULL)) - die("Failed to add resolved note '%s' to notes tree", + die("failed to add resolved note '%s' to notes tree", path.buf); if (o->verbosity >= 4) printf("Added resolved note for object %s: %s\n", diff --git a/notes-utils.c b/notes-utils.c index ac66b82dd31082..85da3cd173a4cd 100644 --- a/notes-utils.c +++ b/notes-utils.c @@ -21,7 +21,7 @@ void create_notes_commit(struct repository *r, assert(t->initialized); if (write_notes_tree(t, &tree_oid)) - die("Failed to write notes tree to database"); + die("failed to write notes tree to database"); if (!parents) { /* Deduce parent commit from t->ref */ @@ -29,7 +29,7 @@ void create_notes_commit(struct repository *r, if (!refs_read_ref(get_main_ref_store(the_repository), t->ref, &parent_oid)) { struct commit *parent = lookup_commit(r, &parent_oid); if (repo_parse_commit(r, parent)) - die("Failed to find/parse commit %s", t->ref); + die("failed to find/parse commit %s", t->ref); commit_list_insert(parent, &parents_to_free); parents = parents_to_free; } @@ -38,7 +38,7 @@ void create_notes_commit(struct repository *r, if (commit_tree(msg, msg_len, &tree_oid, parents, result_oid, NULL, NULL)) - die("Failed to commit notes tree to database"); + die("failed to commit notes tree to database"); free_commit_list(parents_to_free); } @@ -51,7 +51,7 @@ void commit_notes(struct repository *r, struct notes_tree *t, const char *msg) if (!t) t = &default_notes_tree; if (!t->initialized || !t->update_ref || !*t->update_ref) - die(_("Cannot commit uninitialized/unreferenced notes tree")); + die(_("cannot commit uninitialized/unreferenced notes tree")); if (!t->dirty) return; /* don't have to commit an unchanged tree */ diff --git a/notes.c b/notes.c index f5344230505afb..3bb3b2a4685170 100644 --- a/notes.c +++ b/notes.c @@ -405,7 +405,7 @@ static void load_subtree(struct notes_tree *t, struct leaf_node *subtree, buf = fill_tree_descriptor(the_repository, &desc, &subtree->val_oid); if (!buf) - die("Could not read %s for notes-index", + die("could not read %s for notes-index", oid_to_hex(&subtree->val_oid)); prefix_len = subtree->key_oid.hash[KEY_INDEX]; @@ -465,7 +465,7 @@ static void load_subtree(struct notes_tree *t, struct leaf_node *subtree, oid_set_algo(&l->val_oid, the_hash_algo); if (note_tree_insert(t, node, n, l, type, combine_notes_concatenate)) - die("Failed to load %s %s into notes tree " + die("failed to load %s %s into notes tree " "from %s", type == PTR_TYPE_NOTE ? "note" : "subtree", oid_to_hex(&object_oid), t->ref); @@ -1038,9 +1038,9 @@ void init_notes(struct notes_tree *t, const char *notes_ref, repo_get_oid_treeish(the_repository, notes_ref, &object_oid)) goto out; if (flags & NOTES_INIT_WRITABLE && refs_read_ref(get_main_ref_store(the_repository), notes_ref, &object_oid)) - die("Cannot use notes ref %s", notes_ref); + die("cannot use notes ref %s", notes_ref); if (get_tree_entry(the_repository, &object_oid, "", &oid, &mode)) - die("Failed to read notes tree referenced by %s (%s)", + die("failed to read notes tree referenced by %s (%s)", notes_ref, oid_to_hex(&object_oid)); oidclr(&root_tree.key_oid, the_repository->hash_algo); diff --git a/oidset.c b/oidset.c index 8d36aef8dca4fc..aa4592a99bced9 100644 --- a/oidset.c +++ b/oidset.c @@ -88,7 +88,7 @@ void oidset_parse_file_carefully(struct oidset *set, const char *path, oidset_insert(set, &oid); } if (ferror(fp)) - die_errno("Could not read '%s'", path); + die_errno("could not read '%s'", path); fclose(fp); strbuf_release(&sb); } diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c index a06a1f35c619b3..1b63091f541d84 100644 --- a/pack-bitmap-write.c +++ b/pack-bitmap-write.c @@ -158,7 +158,7 @@ void bitmap_writer_build_type_index(struct bitmap_writer *writer, break; default: - die("Missing type information for %s (%d/%d)", + die("missing type information for %s (%d/%d)", oid_to_hex(&entry->idx.oid), real_type, oe_type(entry)); } @@ -765,7 +765,7 @@ static int hashwrite_ewah_helper(void *f, const void *buf, size_t len) static inline void dump_bitmap(struct hashfile *f, struct ewah_bitmap *bitmap) { if (ewah_serialize_to(bitmap, hashwrite_ewah_helper, f) < 0) - die("Failed to write bitmap index"); + die("failed to write bitmap index"); } static const struct object_id *oid_access(size_t pos, const void *table) diff --git a/pack-write.c b/pack-write.c index d61e29ba4ef4eb..072123dbb303bb 100644 --- a/pack-write.c +++ b/pack-write.c @@ -132,7 +132,7 @@ const char *write_idx_file(const struct git_hash_algo *hash_algo, hashwrite(f, obj->oid.hash, hash_algo->rawsz); if ((opts->flags & WRITE_IDX_STRICT) && (i && oideq(&list[-2]->oid, &obj->oid))) - die("The same object %s appears twice in the pack", + die("the same object %s appears twice in the pack", oid_to_hex(&obj->oid)); } @@ -404,15 +404,15 @@ void fixup_pack_header_footer(const struct git_hash_algo *hash_algo, hash_algo->init_fn(&new_hash_ctx); if (lseek(pack_fd, 0, SEEK_SET) != 0) - die_errno("Failed seeking to start of '%s'", pack_name); + die_errno("failed seeking to start of '%s'", pack_name); read_result = read_in_full(pack_fd, &hdr, sizeof(hdr)); if (read_result < 0) - die_errno("Unable to reread header of '%s'", pack_name); + die_errno("unable to reread header of '%s'", pack_name); else if (read_result != sizeof(hdr)) - die_errno("Unexpected short read for header of '%s'", + die_errno("unexpected short read for header of '%s'", pack_name); if (lseek(pack_fd, 0, SEEK_SET) != 0) - die_errno("Failed seeking to start of '%s'", pack_name); + die_errno("failed seeking to start of '%s'", pack_name); git_hash_update(&old_hash_ctx, &hdr, sizeof(hdr)); hdr.hdr_entries = htonl(object_count); git_hash_update(&new_hash_ctx, &hdr, sizeof(hdr)); @@ -429,7 +429,7 @@ void fixup_pack_header_footer(const struct git_hash_algo *hash_algo, if (!n) break; if (n < 0) - die_errno("Failed to checksum '%s'", pack_name); + die_errno("failed to checksum '%s'", pack_name); git_hash_update(&new_hash_ctx, buf, n); aligned_sz -= n; @@ -446,7 +446,7 @@ void fixup_pack_header_footer(const struct git_hash_algo *hash_algo, git_hash_final(hash, &old_hash_ctx); if (!hasheq(hash, partial_pack_hash, hash_algo)) - die("Unexpected checksum for %s " + die("unexpected checksum for %s " "(disk corruption?)", pack_name); /* * Now let's compute the SHA1 of the remainder of the diff --git a/packfile.c b/packfile.c index 2d80d80cb3838d..bc755c9ad3cdd9 100644 --- a/packfile.c +++ b/packfile.c @@ -1260,7 +1260,7 @@ off_t get_delta_base(struct packed_git *p, base_offset = find_pack_entry_one(&oid, p); *curpos += p->repo->hash_algo->rawsz; } else - die("I am totally screwed"); + die("i am totally screwed"); return base_offset; } diff --git a/path.c b/path.c index 07964f5d32c977..9733bef87c779d 100644 --- a/path.c +++ b/path.c @@ -825,7 +825,7 @@ void safe_create_dir(const char *dir, int share) } } else if (share && adjust_shared_perm(dir)) - die(_("Could not make %s writable by group"), dir); + die(_("could not make %s writable by group"), dir); } static int have_same_root(const char *path1, const char *path2) diff --git a/pathspec.c b/pathspec.c index 89663645e13dd4..c7350ef65c2bbc 100644 --- a/pathspec.c +++ b/pathspec.c @@ -179,7 +179,7 @@ static char *attr_value_unescape(const char *value) for (src = value, dst = ret; *src; src++, dst++) { if (*src == '\\') { if (!src[1]) - die(_("Escape character '\\' not allowed as " + die(_("escape character '\\' not allowed as " "last character in attr value")); src++; } @@ -197,7 +197,7 @@ static void parse_pathspec_attr_match(struct pathspec_item *item, const char *va struct string_list list = STRING_LIST_INIT_DUP; if (item->attr_check || item->attr_match) - die(_("Only one 'attr:' specification is allowed.")); + die(_("only one 'attr:' specification is allowed.")); if (!value || !*value) die(_("attr spec must not be empty")); @@ -376,12 +376,12 @@ static const char *parse_long_magic(unsigned *magic, int *prefix_len, } if (ARRAY_SIZE(pathspec_magic) <= i) - die(_("Invalid pathspec magic '%.*s' in '%s'"), + die(_("invalid pathspec magic '%.*s' in '%s'"), (int) len, pos, elem); } if (*pos != ')') - die(_("Missing ')' at the end of pathspec magic in '%s'"), + die(_("missing ')' at the end of pathspec magic in '%s'"), elem); pos++; @@ -419,7 +419,7 @@ static const char *parse_short_magic(unsigned *magic, const char *elem) } if (ARRAY_SIZE(pathspec_magic) <= i) - die(_("Unimplemented pathspec magic '%c' in '%s'"), + die(_("unimplemented pathspec magic '%c' in '%s'"), ch, elem); } diff --git a/remote-curl.c b/remote-curl.c index 1273507a96cae9..5dbcc825bb16ce 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -523,7 +523,7 @@ static struct discovery *discover_refs(const char *service, int for_push) transport_anonymize_url(url.buf)); case HTTP_NOAUTH: show_http_message(&type, &charset, &buffer); - die(_("Authentication failed for '%s'"), + die(_("authentication failed for '%s'"), transport_anonymize_url(url.buf)); case HTTP_NOMATCHPUBLICKEY: show_http_message(&type, &charset, &buffer); diff --git a/remote.c b/remote.c index c1cf363cca7b85..27b1972add8603 100644 --- a/remote.c +++ b/remote.c @@ -847,7 +847,7 @@ static void handle_duplicate(struct ref *ref1, struct ref *ref2) if (strcmp(ref1->name, ref2->name)) { if (ref1->fetch_head_status != FETCH_HEAD_IGNORE && ref2->fetch_head_status != FETCH_HEAD_IGNORE) { - die(_("Cannot fetch both %s and %s to %s"), + die(_("cannot fetch both %s and %s to %s"), ref1->name, ref2->name, ref2->peer_ref->name); } else if (ref1->fetch_head_status != FETCH_HEAD_IGNORE && ref2->fetch_head_status == FETCH_HEAD_IGNORE) { diff --git a/scalar.c b/scalar.c index da42b4be0cc9b6..6b997212ab0dfe 100644 --- a/scalar.c +++ b/scalar.c @@ -60,7 +60,7 @@ static void setup_enlistment_directory(int argc, const char **argv, setup_git_directory(); if (!the_repository->worktree) - die(_("Scalar enlistments require a worktree")); + die(_("scalar enlistments require a worktree")); if (enlistment_root) { if (enlistment_is_repo_parent) @@ -222,7 +222,7 @@ static int add_or_remove_enlistment(int add) int res; if (!the_repository->worktree) - die(_("Scalar enlistments require a worktree")); + die(_("scalar enlistments require a worktree")); res = run_git("config", "--global", "--get", "--fixed-value", "scalar.repo", the_repository->worktree, NULL); diff --git a/sequencer.c b/sequencer.c index 407ee4e90fea68..80a2bc4a818c45 100644 --- a/sequencer.c +++ b/sequencer.c @@ -700,7 +700,7 @@ enum commit_msg_cleanup_mode get_cleanup_mode(const char *cleanup_arg, return use_editor ? COMMIT_MSG_CLEANUP_SCISSORS : COMMIT_MSG_CLEANUP_SPACE; else - die(_("Invalid cleanup mode %s"), cleanup_arg); + die(_("invalid cleanup mode %s"), cleanup_arg); } /* @@ -4662,17 +4662,17 @@ static void create_autostash_internal(struct repository *r, stash.no_stdin = 1; strbuf_reset(&buf); if (capture_command(&stash, &buf, GIT_MAX_HEXSZ)) - die(_("Cannot autostash")); + die(_("cannot autostash")); strbuf_trim_trailing_newline(&buf); if (repo_get_oid(r, buf.buf, &oid)) - die(_("Unexpected stash response: '%s'"), + die(_("unexpected stash response: '%s'"), buf.buf); strbuf_reset(&buf); strbuf_add_unique_abbrev(&buf, &oid, DEFAULT_ABBREV); if (path) { if (safe_create_leading_directories_const(path)) - die(_("Could not create directory for '%s'"), + die(_("could not create directory for '%s'"), path); write_file(path, "%s", oid_to_hex(&oid)); } else { diff --git a/setup.c b/setup.c index 7da7aa8984b6df..24c964f7305e7f 100644 --- a/setup.c +++ b/setup.c @@ -1748,7 +1748,7 @@ const char *setup_git_directory_gently(int *nongit_ok) *nongit_ok = 0; if (strbuf_getcwd(&cwd)) - die_errno(_("Unable to read current working directory")); + die_errno(_("unable to read current working directory")); strbuf_addbuf(&dir, &cwd); switch (setup_git_directory_gently_1(&dir, &gitdir, &report, 1)) { diff --git a/shell.c b/shell.c index 76333c80686d8f..dab5b693db57e8 100644 --- a/shell.c +++ b/shell.c @@ -174,7 +174,7 @@ int cmd_main(int argc, const char **argv) /* Allow the user to run an interactive shell */ cd_to_homedir(); if (access(COMMAND_DIR, R_OK | X_OK) == -1) { - die("Interactive git shell is not enabled.\n" + die("interactive git shell is not enabled.\n" "hint: ~/" COMMAND_DIR " should exist " "and have read and execute access."); } @@ -186,7 +186,7 @@ int cmd_main(int argc, const char **argv) * "cmd arg", where "cmd" is a very limited subset of git * commands or a command in the COMMAND_DIR */ - die("Run with no arguments or with -c cmd"); + die("run with no arguments or with -c cmd"); } prog = xstrdup(argv[2]); diff --git a/strbuf.c b/strbuf.c index f30fdc6984310e..0ab2f691919ab0 100644 --- a/strbuf.c +++ b/strbuf.c @@ -662,7 +662,7 @@ int strbuf_getwholeline(struct strbuf *sb, FILE *fp, int term) * enough to hold a single line of input, anyway. */ if (errno == ENOMEM) - die("Out of memory, getdelim failed"); + die("out of memory, getdelim failed"); /* * Restore strbuf invariants; if getdelim left us with a NULL pointer, diff --git a/submodule.c b/submodule.c index b361076c5b97a0..905f88fb9bfdf4 100644 --- a/submodule.c +++ b/submodule.c @@ -122,7 +122,7 @@ int update_path_in_gitmodules(const char *oldpath, const char *newpath) return -1; if (is_gitmodules_unmerged(the_repository->index)) - die(_("Cannot change unmerged .gitmodules, resolve merge conflicts first")); + die(_("cannot change unmerged .gitmodules, resolve merge conflicts first")); submodule = submodule_from_path(the_repository, null_oid(), oldpath); if (!submodule || !submodule->name) { @@ -151,7 +151,7 @@ int remove_path_from_gitmodules(const char *path) return -1; if (is_gitmodules_unmerged(the_repository->index)) - die(_("Cannot change unmerged .gitmodules, resolve merge conflicts first")); + die(_("cannot change unmerged .gitmodules, resolve merge conflicts first")); submodule = submodule_from_path(the_repository, null_oid(), path); if (!submodule || !submodule->name) { @@ -384,7 +384,7 @@ void die_path_inside_submodule(struct index_state *istate, if (item->len == ce_len + 1) continue; - die(_("Pathspec '%s' is in submodule '%.*s'"), + die(_("pathspec '%s' is in submodule '%.*s'"), item->original, ce_len, ce->name); } } @@ -1090,7 +1090,7 @@ static int submodule_needs_pushing(struct repository *r, cp.out = -1; cp.dir = path; if (start_command(&cp)) - die(_("Could not run 'git rev-list --not --remotes -n 1' command in submodule %s"), + die(_("could not run 'git rev-list --not --remotes -n 1' command in submodule %s"), path); if (strbuf_read(&buf, cp.out, the_hash_algo->hexsz + 1)) needs_pushing = 1; @@ -1255,7 +1255,7 @@ int push_unpushed_submodules(struct repository *r, head = refs_resolve_refdup(get_main_ref_store(the_repository), "HEAD", 0, &head_oid, NULL); if (!head) - die(_("Failed to resolve HEAD as a valid ref.")); + die(_("failed to resolve HEAD as a valid ref.")); for (i = 0; i < needs_pushing.nr; i++) submodule_push_check(needs_pushing.items[i].string, @@ -1929,7 +1929,7 @@ unsigned is_submodule_modified(const char *path, int ignore_untracked) cp.out = -1; cp.dir = path; if (start_command(&cp)) - die(_("Could not run 'git status --porcelain=2' in submodule %s"), path); + die(_("could not run 'git status --porcelain=2' in submodule %s"), path); fp = xfdopen(cp.out, "r"); while (strbuf_getwholeline(&buf, fp, '\n') != EOF) { diff --git a/tempfile.c b/tempfile.c index ed88cf84314753..e502a54955aec6 100644 --- a/tempfile.c +++ b/tempfile.c @@ -254,7 +254,7 @@ struct tempfile *xmks_tempfile_m(const char *filename_template, int mode) strbuf_add_absolute_path(&full_template, filename_template); tempfile = mks_tempfile_m(full_template.buf, mode); if (!tempfile) - die_errno("Unable to create temporary file '%s'", + die_errno("unable to create temporary file '%s'", full_template.buf); strbuf_release(&full_template); diff --git a/transport.c b/transport.c index 6c2801bcbd9d02..1866ef20a7297e 100644 --- a/transport.c +++ b/transport.c @@ -1313,7 +1313,7 @@ static void die_with_unpushed_submodules(struct string_list *needs_pushing) string_list_clear(needs_pushing, 0); - die(_("Aborting.")); + die(_("aborting.")); } static int run_pre_push_hook(struct transport *transport, diff --git a/tree.c b/tree.c index ad86ad1ba99b74..8b090928c8939c 100644 --- a/tree.c +++ b/tree.c @@ -60,12 +60,12 @@ int read_tree_at(struct repository *r, commit = lookup_commit(r, &entry.oid); if (!commit) - die("Commit %s in submodule path %s%s not found", + die("commit %s in submodule path %s%s not found", oid_to_hex(&entry.oid), base->buf, entry.path); if (repo_parse_commit(r, commit)) - die("Invalid commit %s in submodule path %s%s", + die("invalid commit %s in submodule path %s%s", oid_to_hex(&entry.oid), base->buf, entry.path); diff --git a/worktree.c b/worktree.c index d4a68c9c235677..3ff3bec4cbcab3 100644 --- a/worktree.c +++ b/worktree.c @@ -125,7 +125,7 @@ struct worktree *get_linked_worktree(const char *id, struct strbuf worktree_path = STRBUF_INIT; if (!id) - die("Missing linked worktree name"); + die("missing linked worktree name"); strbuf_git_common_path(&path, the_repository, "worktrees/%s/gitdir", id); if (strbuf_read_file(&worktree_path, path.buf, 0) <= 0) diff --git a/wrapper.c b/wrapper.c index 8b985931490d62..cee175e6722eb9 100644 --- a/wrapper.c +++ b/wrapper.c @@ -57,7 +57,7 @@ static void *do_xmalloc(size_t size, int gentle) ret = malloc(1); if (!ret) { if (!gentle) - die("Out of memory, malloc failed (tried to allocate %lu bytes)", + die("out of memory, malloc failed (tried to allocate %lu bytes)", (unsigned long)size); else { error("Out of memory, malloc failed (tried to allocate %lu bytes)", @@ -84,7 +84,7 @@ static void *do_xmallocz(size_t size, int gentle) error("Data too large to fit into virtual memory space."); return NULL; } else - die("Data too large to fit into virtual memory space."); + die("data too large to fit into virtual memory space."); } ret = do_xmalloc(size + 1, gentle); if (ret) @@ -139,7 +139,7 @@ void *xrealloc(void *ptr, size_t size) memory_limit_check(size, 0); ret = realloc(ptr, size); if (!ret) - die("Out of memory, realloc failed"); + die("out of memory, realloc failed"); return ret; } @@ -155,7 +155,7 @@ void *xcalloc(size_t nmemb, size_t size) if (!ret && (!nmemb || !size)) ret = calloc(1, 1); if (!ret) - die("Out of memory, calloc failed"); + die("out of memory, calloc failed"); return ret; } @@ -376,7 +376,7 @@ FILE *xfdopen(int fd, const char *mode) { FILE *stream = fdopen(fd, mode); if (!stream) - die_errno("Out of memory? fdopen failed"); + die_errno("out of memory? fdopen failed"); return stream; } @@ -435,7 +435,7 @@ int xmkstemp(char *filename_template) nonrelative_template = absolute_path(filename_template); errno = saved_errno; - die_errno("Unable to create temporary file '%s'", + die_errno("unable to create temporary file '%s'", nonrelative_template); } return fd; @@ -525,7 +525,7 @@ int xmkstemp_mode(char *filename_template, int mode) nonrelative_template = absolute_path(filename_template); errno = saved_errno; - die_errno("Unable to create temporary file '%s'", + die_errno("unable to create temporary file '%s'", nonrelative_template); } return fd; diff --git a/wt-status.c b/wt-status.c index 3ee918176422c7..05076d68fa77f6 100644 --- a/wt-status.c +++ b/wt-status.c @@ -1389,7 +1389,7 @@ static int read_rebase_todolist(const char *fname, struct string_list *lines) if (!f) { if (errno == ENOENT) return -1; - die_errno("Could not open file %s for reading", + die_errno("could not open file %s for reading", git_path("%s", fname)); } while (!strbuf_getline_lf(&line, f)) { diff --git a/xdiff-interface.c b/xdiff-interface.c index 3bd61f26e9043e..73293c520b2a61 100644 --- a/xdiff-interface.c +++ b/xdiff-interface.c @@ -268,7 +268,7 @@ void xdiff_set_find_func(xdemitconf_t *xecfg, const char *value, int cflags) reg->negate = (*value == '!'); if (reg->negate && i == regs->nr - 1) - die("Last expression must not be negated: %s", value); + die("last expression must not be negated: %s", value); if (*value == '!') value++; if (ep) @@ -276,7 +276,7 @@ void xdiff_set_find_func(xdemitconf_t *xecfg, const char *value, int cflags) else expression = value; if (regcomp(®->re, expression, cflags)) - die("Invalid regexp to look for hunk header: %s", expression); + die("invalid regexp to look for hunk header: %s", expression); free(buffer); value = ep ? ep + 1 : NULL; }