Update messages in preparation for i18n

Many messages will be marked for translation in the following commits. This commit updates some of them to be more consistent and reduce diff noise in those commits. Changes are - keep the first letter of die(), error() and warning() in lowercase - no full stop in die(), error() or warning() if it's single sentence messages - indentation - some messages are turned to BUG(), or prefixed with "BUG:" and will not be marked for i18n - some messages are improved to give more information - some messages are broken down by sentence to be i18n friendly (on the same token, combine multiple warning() into one big string) - the trailing \n is converted to printf_ln if possible, or deleted if not redundant - errno_errno() is used instead of explicit strerror() Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Jul 21, 2018 at 09:49 UTC 1a07e59c3e269418f3f5d186d166bf5ab5db6667
30 files changed +154 -146
archive-zip.c
+1 -1
@@ -309,7 +309,7 @@ static int write_zip_entry(struct archiver_args *args,
309 if (is_utf8(path))
310 flags |= ZIP_UTF8;
311 else
312 - warning("Path is not valid UTF-8: %s", path);
312 + warning("path is not valid UTF-8: %s", path);
313 }
314
315 if (pathlen > 0xffff) {
builtin/blame.c
+1 -1
@@ -408,7 +408,7 @@ static void parse_color_fields(const char *s)
408 }
409
410 if (next == EXPECT_COLOR)
411 - die (_("must end with a color"));
411 + die(_("must end with a color"));
412
413 colorfield[colorfield_nr].hop = TIME_MAX;
414 string_list_clear(&l, 0);
builtin/checkout.c
+2 -2
@@ -1191,12 +1191,12 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
1191 if (opts.track != BRANCH_TRACK_UNSPECIFIED && !opts.new_branch) {
1192 const char *argv0 = argv[0];
1193 if (!argc || !strcmp(argv0, "--"))
1194 - die (_("--track needs a branch name"));
1194 + die(_("--track needs a branch name"));
1195 skip_prefix(argv0, "refs/", &argv0);
1196 skip_prefix(argv0, "remotes/", &argv0);
1197 argv0 = strchr(argv0, '/');
1198 if (!argv0 || !argv0[1])
1199 - die (_("Missing branch name; try -b"));
1199 + die(_("missing branch name; try -b"));
1200 opts.new_branch = argv0 + 1;
1201 }
1202
builtin/commit.c
+3 -3
@@ -1647,9 +1647,9 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
1647 unlink(git_path_squash_msg());
1648
1649 if (commit_index_files())
1650 - die (_("Repository has been updated, but unable to write\n"
1651 - "new_index file. Check that disk is not full and quota is\n"
1652 - "not exceeded, and then \"git reset HEAD\" to recover."));
1650 + die(_("repository has been updated, but unable to write\n"
1651 + "new_index file. Check that disk is not full and quota is\n"
1652 + "not exceeded, and then \"git reset HEAD\" to recover."));
1653
1654 rerere(0);
1655 run_command_v_opt(argv_gc_auto, RUN_GIT_CMD);
builtin/config.c
+11 -7
@@ -110,7 +110,7 @@ static int option_parse_type(const struct option *opt, const char *arg,
110 * --int' and '--type=bool
111 * --type=int'.
112 */
113 - error("only one type at a time.");
113 + error("only one type at a time");
114 usage_with_options(builtin_config_usage,
115 builtin_config_options);
116 }
@@ -160,7 +160,11 @@ static struct option builtin_config_options[] = {
160 static void check_argc(int argc, int min, int max) {
161 if (argc >= min && argc <= max)
162 return;
163 - error("wrong number of arguments");
163 + if (min == max)
164 + error("wrong number of arguments, should be %d", min);
165 + else
166 + error("wrong number of arguments, should be from %d to %d",
167 + min, max);
168 usage_with_options(builtin_config_usage, builtin_config_options);
169 }
170
@@ -595,7 +599,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
599
600 if (use_global_config + use_system_config + use_local_config +
601 !!given_config_source.file + !!given_config_source.blob > 1) {
598 - error("only one config file at a time.");
602 + error("only one config file at a time");
603 usage_with_options(builtin_config_usage, builtin_config_options);
604 }
605
@@ -664,7 +668,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
668 }
669
670 if (HAS_MULTI_BITS(actions)) {
667 - error("only one action at a time.");
671 + error("only one action at a time");
672 usage_with_options(builtin_config_usage, builtin_config_options);
673 }
674 if (actions == 0)
@@ -684,7 +688,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
688 if (show_origin && !(actions &
689 (ACTION_GET|ACTION_GET_ALL|ACTION_GET_REGEXP|ACTION_LIST))) {
690 error("--show-origin is only applicable to --get, --get-all, "
687 - "--get-regexp, and --list.");
691 + "--get-regexp, and --list");
692 usage_with_options(builtin_config_usage, builtin_config_options);
693 }
694
@@ -819,7 +823,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
823 if (ret < 0)
824 return ret;
825 if (ret == 0)
822 - die("No such section!");
826 + die("no such section: %s", argv[0]);
827 }
828 else if (actions == ACTION_REMOVE_SECTION) {
829 int ret;
@@ -830,7 +834,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
834 if (ret < 0)
835 return ret;
836 if (ret == 0)
833 - die("No such section!");
837 + die("no such section: %s", argv[0]);
838 }
839 else if (actions == ACTION_GET_COLOR) {
840 check_argc(argc, 1, 2);
builtin/fast-export.c
+21 -21
@@ -240,7 +240,7 @@ static void export_blob(const struct object_id *oid)
240 } else {
241 buf = read_object_file(oid, &type, &size);
242 if (!buf)
243 - die ("Could not read blob %s", oid_to_hex(oid));
243 + die("could not read blob %s", oid_to_hex(oid));
244 if (check_object_signature(oid, buf, size, type_name(type)) < 0)
245 die("sha1 mismatch in blob %s", oid_to_hex(oid));
246 object = parse_object_buffer(oid, type, size, buf, &eaten);
@@ -253,7 +253,7 @@ static void export_blob(const struct object_id *oid)
253
254 printf("blob\nmark :%"PRIu32"\ndata %lu\n", last_idnum, size);
255 if (size && fwrite(buf, size, 1, stdout) != 1)
256 - die_errno ("Could not write blob '%s'", oid_to_hex(oid));
256 + die_errno("could not write blob '%s'", oid_to_hex(oid));
257 printf("\n");
258
259 show_progress();
@@ -560,14 +560,14 @@ static void handle_commit(struct commit *commit, struct rev_info *rev,
560 commit_buffer = get_commit_buffer(commit, NULL);
561 author = strstr(commit_buffer, "\nauthor ");
562 if (!author)
563 - die ("Could not find author in commit %s",
564 - oid_to_hex(&commit->object.oid));
563 + die("could not find author in commit %s",
564 + oid_to_hex(&commit->object.oid));
565 author++;
566 author_end = strchrnul(author, '\n');
567 committer = strstr(author_end, "\ncommitter ");
568 if (!committer)
569 - die ("Could not find committer in commit %s",
570 - oid_to_hex(&commit->object.oid));
569 + die("could not find committer in commit %s",
570 + oid_to_hex(&commit->object.oid));
571 committer++;
572 committer_end = strchrnul(committer, '\n');
573 message = strstr(committer_end, "\n\n");
@@ -688,7 +688,7 @@ static void handle_tag(const char *name, struct tag *tag)
688
689 buf = read_object_file(&tag->object.oid, &type, &size);
690 if (!buf)
691 - die ("Could not read tag %s", oid_to_hex(&tag->object.oid));
691 + die("could not read tag %s", oid_to_hex(&tag->object.oid));
692 message = memmem(buf, size, "\n\n", 2);
693 if (message) {
694 message += 2;
@@ -725,18 +725,18 @@ static void handle_tag(const char *name, struct tag *tag)
725 if (signature)
726 switch(signed_tag_mode) {
727 case ABORT:
728 - die ("Encountered signed tag %s; use "
729 - "--signed-tags=<mode> to handle it.",
730 - oid_to_hex(&tag->object.oid));
728 + die("encountered signed tag %s; use "
729 + "--signed-tags=<mode> to handle it",
730 + oid_to_hex(&tag->object.oid));
731 case WARN:
732 - warning ("Exporting signed tag %s",
733 - oid_to_hex(&tag->object.oid));
732 + warning("exporting signed tag %s",
733 + oid_to_hex(&tag->object.oid));
734 /* fallthru */
735 case VERBATIM:
736 break;
737 case WARN_STRIP:
738 - warning ("Stripping signature from tag %s",
739 - oid_to_hex(&tag->object.oid));
738 + warning("stripping signature from tag %s",
739 + oid_to_hex(&tag->object.oid));
740 /* fallthru */
741 case STRIP:
742 message_size = signature + 1 - message;
@@ -750,18 +750,18 @@ static void handle_tag(const char *name, struct tag *tag)
750 if (!tagged_mark) {
751 switch(tag_of_filtered_mode) {
752 case ABORT:
753 - die ("Tag %s tags unexported object; use "
754 - "--tag-of-filtered-object=<mode> to handle it.",
755 - oid_to_hex(&tag->object.oid));
753 + die("tag %s tags unexported object; use "
754 + "--tag-of-filtered-object=<mode> to handle it",
755 + oid_to_hex(&tag->object.oid));
756 case DROP:
757 /* Ignore this tag altogether */
758 free(buf);
759 return;
760 case REWRITE:
761 if (tagged->type != OBJ_COMMIT) {
762 - die ("Tag %s tags unexported %s!",
763 - oid_to_hex(&tag->object.oid),
764 - type_name(tagged->type));
762 + die("tag %s tags unexported %s!",
763 + oid_to_hex(&tag->object.oid),
764 + type_name(tagged->type));
765 }
766 p = (struct commit *)tagged;
767 for (;;) {
@@ -772,7 +772,7 @@ static void handle_tag(const char *name, struct tag *tag)
772 if (!(p->object.flags & TREESAME))
773 break;
774 if (!p->parents)
775 - die ("Can't find replacement commit for tag %s\n",
775 + die("can't find replacement commit for tag %s",
776 oid_to_hex(&tag->object.oid));
777 p = p->parents->item;
778 }
builtin/fmt-merge-msg.c
+1 -1
@@ -623,7 +623,7 @@ int fmt_merge_msg(struct strbuf *in, struct strbuf *out,
623 i++;
624 p[len] = 0;
625 if (handle_line(p, &merge_parents))
626 - die ("Error in line %d: %.*s", i, len, p);
626 + die("error in line %d: %.*s", i, len, p);
627 }
628
629 if (opts->add_title && srcs.nr)
builtin/grep.c
+5 -5
@@ -959,7 +959,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
959 }
960
961 if (!opt.pattern_list)
962 - die(_("no pattern given."));
962 + die(_("no pattern given"));
963
964 /*
965 * We have to find "--" in a separate pass, because its presence
@@ -1085,19 +1085,19 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
1085 }
1086
1087 if (recurse_submodules && (!use_index || untracked))
1088 - die(_("option not supported with --recurse-submodules."));
1088 + die(_("option not supported with --recurse-submodules"));
1089
1090 if (!show_in_pager && !opt.status_only)
1091 setup_pager();
1092
1093 if (!use_index && (untracked || cached))
1094 - die(_("--cached or --untracked cannot be used with --no-index."));
1094 + die(_("--cached or --untracked cannot be used with --no-index"));
1095
1096 if (!use_index || untracked) {
1097 int use_exclude = (opt_exclude < 0) ? use_index : !!opt_exclude;
1098 hit = grep_directory(&opt, &pathspec, use_exclude, use_index);
1099 } else if (0 <= opt_exclude) {
1100 - die(_("--[no-]exclude-standard cannot be used for tracked contents."));
1100 + die(_("--[no-]exclude-standard cannot be used for tracked contents"));
1101 } else if (!list.nr) {
1102 if (!cached)
1103 setup_work_tree();
@@ -1105,7 +1105,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
1105 hit = grep_cache(&opt, the_repository, &pathspec, cached);
1106 } else {
1107 if (cached)
1108 - die(_("both --cached and trees are given."));
1108 + die(_("both --cached and trees are given"));
1109
1110 hit = grep_objects(&opt, &pathspec, &list);
1111 }
builtin/log.c
+3 -3
@@ -1606,14 +1606,14 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
1606 numbered = 0;
1607
1608 if (numbered && keep_subject)
1609 - die (_("-n and -k are mutually exclusive."));
1609 + die(_("-n and -k are mutually exclusive"));
1610 if (keep_subject && subject_prefix)
1611 - die (_("--subject-prefix/--rfc and -k are mutually exclusive."));
1611 + die(_("--subject-prefix/--rfc and -k are mutually exclusive"));
1612 rev.preserve_subject = keep_subject;
1613
1614 argc = setup_revisions(argc, argv, &rev, &s_r_opt);
1615 if (argc > 1)
1616 - die (_("unrecognized argument: %s"), argv[1]);
1616 + die(_("unrecognized argument: %s"), argv[1]);
1617
1618 if (rev.diffopt.output_format & DIFF_FORMAT_NAME)
1619 die(_("--name-only does not make sense"));
builtin/merge.c
+1 -1
@@ -693,7 +693,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
693 exit(128);
694 if (write_locked_index(&the_index, &lock,
695 COMMIT_LOCK | SKIP_IF_UNCHANGED))
696 - die (_("unable to write %s"), get_index_file());
696 + die(_("unable to write %s"), get_index_file());
697 return clean ? 0 : 1;
698 } else {
699 return try_merge_command(strategy, xopts_nr, xopts,
builtin/pack-objects.c
+15 -10
@@ -148,8 +148,13 @@ static void *get_delta(struct object_entry *entry)
148 oid_to_hex(&DELTA(entry)->idx.oid));
149 delta_buf = diff_delta(base_buf, base_size,
150 buf, size, &delta_size, 0);
151 + /*
152 + * We succesfully computed this delta once but dropped it for
153 + * memory reasons. Something is very wrong if this time we
154 + * recompute and create a different delta.
155 + */
156 if (!delta_buf || delta_size != DELTA_SIZE(entry))
152 - die("delta size changed");
157 + BUG("delta size changed");
158 free(buf);
159 free(base_buf);
160 return delta_buf;
@@ -2341,8 +2346,8 @@ static void ll_find_deltas(struct object_entry **list, unsigned list_size,
2346 return;
2347 }
2348 if (progress > pack_to_stdout)
2344 - fprintf(stderr, "Delta compression using up to %d threads.\n",
2345 - delta_search_threads);
2349 + fprintf_ln(stderr, "Delta compression using up to %d threads",
2350 + delta_search_threads);
2351 p = xcalloc(delta_search_threads, sizeof(*p));
2352
2353 /* Partition the work amongst work threads. */
@@ -2638,7 +2643,7 @@ static void read_object_list_from_stdin(void)
2643 if (feof(stdin))
2644 break;
2645 if (!ferror(stdin))
2641 - die("fgets returned NULL, not EOF, not error!");
2646 + die("BUG: fgets returned NULL, not EOF, not error!");
2647 if (errno != EINTR)
2648 die_errno("fgets");
2649 clearerr(stdin);
@@ -3263,7 +3268,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
3268 if (!pack_to_stdout && !pack_size_limit)
3269 pack_size_limit = pack_size_limit_cfg;
3270 if (pack_to_stdout && pack_size_limit)
3266 - die("--max-pack-size cannot be used to build a pack for transfer.");
3271 + die("--max-pack-size cannot be used to build a pack for transfer");
3272 if (pack_size_limit && pack_size_limit < 1024*1024) {
3273 warning("minimum pack size limit is 1 MiB");
3274 pack_size_limit = 1024*1024;
@@ -3273,13 +3278,13 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
3278 die("--thin cannot be used to build an indexable pack.");
3279
3280 if (keep_unreachable && unpack_unreachable)
3276 - die("--keep-unreachable and --unpack-unreachable are incompatible.");
3281 + die("--keep-unreachable and --unpack-unreachable are incompatible");
3282 if (!rev_list_all || !rev_list_reflog || !rev_list_index)
3283 unpack_unreachable_expiration = 0;
3284
3285 if (filter_options.choice) {
3286 if (!pack_to_stdout)
3282 - die("cannot use --filter without --stdout.");
3287 + die("cannot use --filter without --stdout");
3288 use_bitmap_index = 0;
3289 }
3290
@@ -3353,8 +3358,8 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
3358 prepare_pack(window, depth);
3359 write_pack_file();
3360 if (progress)
3356 - fprintf(stderr, "Total %"PRIu32" (delta %"PRIu32"),"
3357 - " reused %"PRIu32" (delta %"PRIu32")\n",
3358 - written, written_delta, reused, reused_delta);
3361 + fprintf_ln(stderr, "Total %"PRIu32" (delta %"PRIu32"),"
3362 + " reused %"PRIu32" (delta %"PRIu32")",
3363 + written, written_delta, reused, reused_delta);
3364 return 0;
3365 }
builtin/replace.c
+13 -13
@@ -54,7 +54,7 @@ static int show_reference(const char *refname, const struct object_id *oid,
54 enum object_type obj_type, repl_type;
55
56 if (get_oid(refname, &object))
57 - return error("Failed to resolve '%s' as a valid ref.", refname);
57 + return error("failed to resolve '%s' as a valid ref", refname);
58
59 obj_type = oid_object_info(the_repository, &object,
60 NULL);
@@ -84,7 +84,7 @@ static int list_replace_refs(const char *pattern, const char *format)
84 data.format = REPLACE_FORMAT_LONG;
85 else
86 return error("invalid replace format '%s'\n"
87 - "valid formats are 'short', 'medium' and 'long'\n",
87 + "valid formats are 'short', 'medium' and 'long'",
88 format);
89
90 for_each_replace_ref(the_repository, show_reference, (void *)&data);
@@ -108,7 +108,7 @@ static int for_each_replace_name(const char **argv, each_replace_name_fn fn)
108
109 for (p = argv; *p; p++) {
110 if (get_oid(*p, &oid)) {
111 - error("Failed to resolve '%s' as a valid ref.", *p);
111 + error("failed to resolve '%s' as a valid ref", *p);
112 had_error = 1;
113 continue;
114 }
@@ -118,7 +118,7 @@ static int for_each_replace_name(const char **argv, each_replace_name_fn fn)
118 full_hex = ref.buf + base_len;
119
120 if (read_ref(ref.buf, &oid)) {
121 - error("replace ref '%s' not found.", full_hex);
121 + error("replace ref '%s' not found", full_hex);
122 had_error = 1;
123 continue;
124 }
@@ -134,7 +134,7 @@ static int delete_replace_ref(const char *name, const char *ref,
134 {
135 if (delete_ref(NULL, ref, oid, 0))
136 return 1;
137 - printf("Deleted replace ref '%s'\n", name);
137 + printf_ln("Deleted replace ref '%s'", name);
138 return 0;
139 }
140
@@ -146,7 +146,7 @@ static int check_ref_valid(struct object_id *object,
146 strbuf_reset(ref);
147 strbuf_addf(ref, "%s%s", git_replace_ref_base, oid_to_hex(object));
148 if (check_refname_format(ref->buf, 0))
149 - return error("'%s' is not a valid ref name.", ref->buf);
149 + return error("'%s' is not a valid ref name", ref->buf);
150
151 if (read_ref(ref->buf, prev))
152 oidclr(prev);
@@ -200,10 +200,10 @@ static int replace_object(const char *object_ref, const char *replace_ref, int f
200 struct object_id object, repl;
201
202 if (get_oid(object_ref, &object))
203 - return error("Failed to resolve '%s' as a valid ref.",
203 + return error("failed to resolve '%s' as a valid ref",
204 object_ref);
205 if (get_oid(replace_ref, &repl))
206 - return error("Failed to resolve '%s' as a valid ref.",
206 + return error("failed to resolve '%s' as a valid ref",
207 replace_ref);
208
209 return replace_object_oid(object_ref, &object, replace_ref, &repl, force);
@@ -315,7 +315,7 @@ static int edit_and_replace(const char *object_ref, int force, int raw)
315 struct strbuf ref = STRBUF_INIT;
316
317 if (get_oid(object_ref, &old_oid) < 0)
318 - return error("Not a valid object name: '%s'", object_ref);
318 + return error("not a valid object name: '%s'", object_ref);
319
320 type = oid_object_info(the_repository, &old_oid, NULL);
321 if (type < 0)
@@ -368,7 +368,7 @@ static int replace_parents(struct strbuf *buf, int argc, const char **argv)
368 struct object_id oid;
369 if (get_oid(argv[i], &oid) < 0) {
370 strbuf_release(&new_parents);
371 - return error(_("Not a valid object name: '%s'"),
371 + return error(_("not a valid object name: '%s'"),
372 argv[i]);
373 }
374 if (!lookup_commit_reference(&oid)) {
@@ -412,7 +412,7 @@ static int check_one_mergetag(struct commit *commit,
412 for (i = 1; i < mergetag_data->argc; i++) {
413 struct object_id oid;
414 if (get_oid(mergetag_data->argv[i], &oid) < 0)
415 - return error(_("Not a valid object name: '%s'"),
415 + return error(_("not a valid object name: '%s'"),
416 mergetag_data->argv[i]);
417 if (!oidcmp(&tag->tagged->oid, &oid))
418 return 0; /* found */
@@ -442,7 +442,7 @@ static int create_graft(int argc, const char **argv, int force, int gentle)
442 unsigned long size;
443
444 if (get_oid(old_ref, &old_oid) < 0)
445 - return error(_("Not a valid object name: '%s'"), old_ref);
445 + return error(_("not a valid object name: '%s'"), old_ref);
446 commit = lookup_commit_reference(&old_oid);
447 if (!commit)
448 return error(_("could not parse %s"), old_ref);
@@ -457,7 +457,7 @@ static int create_graft(int argc, const char **argv, int force, int gentle)
457 }
458
459 if (remove_signature(&buf)) {
460 - warning(_("the original commit '%s' has a gpg signature."), old_ref);
460 + warning(_("the original commit '%s' has a gpg signature"), old_ref);
461 warning(_("the signature will be removed in the replacement commit!"));
462 }
463
builtin/rm.c
+1 -1
@@ -285,7 +285,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix)
285 list.entry[list.nr].is_submodule = S_ISGITLINK(ce->ce_mode);
286 if (list.entry[list.nr++].is_submodule &&
287 !is_staging_gitmodules_ok(&the_index))
288 - die (_("Please stage your changes to .gitmodules or stash them to proceed"));
288 + die(_("please stage your changes to .gitmodules or stash them to proceed"));
289 }
290
291 if (pathspec.nr) {
config.c
+3 -3
@@ -461,7 +461,7 @@ int git_config_from_parameters(config_fn_t fn, void *data)
461 envw = xstrdup(env);
462
463 if (sq_dequote_to_argv(envw, &argv, &nr, &alloc) < 0) {
464 - ret = error("bogus format in " CONFIG_DATA_ENVIRONMENT);
464 + ret = error("bogus format in %s", CONFIG_DATA_ENVIRONMENT);
465 goto out;
466 }
467
@@ -1411,8 +1411,8 @@ static int git_default_push_config(const char *var, const char *value)
1411 push_default = PUSH_DEFAULT_CURRENT;
1412 else {
1413 error("malformed value for %s: %s", var, value);
1414 - return error("Must be one of nothing, matching, simple, "
1415 - "upstream or current.");
1414 + return error("must be one of nothing, matching, simple, "
1415 + "upstream or current");
1416 }
1417 return 0;
1418 }
connect.c
+10 -11
@@ -58,7 +58,7 @@ static NORETURN void die_initial_contact(int unexpected)
58 * response does not necessarily mean an ACL problem, though.
59 */
60 if (unexpected)
61 - die(_("The remote end hung up upon initial contact"));
61 + die(_("the remote end hung up upon initial contact"));
62 else
63 die(_("Could not read from remote repository.\n\n"
64 "Please make sure you have the correct access rights\n"
@@ -230,7 +230,7 @@ static int process_dummy_ref(const char *line)
230 static void check_no_capabilities(const char *line, int len)
231 {
232 if (strlen(line) != len)
233 - warning("Ignoring capabilities after first line '%s'",
233 + warning("ignoring capabilities after first line '%s'",
234 line + strlen(line));
235 }
236
@@ -544,7 +544,7 @@ static enum protocol get_protocol(const char *name)
544 return PROTO_SSH;
545 if (!strcmp(name, "file"))
546 return PROTO_FILE;
547 - die("I don't handle protocol '%s'", name);
547 + die("protocol '%s' is not supported", name);
548 }
549
550 static char *host_end(char **hoststart, int removebrackets)
@@ -595,8 +595,7 @@ static void enable_keepalive(int sockfd)
595 int ka = 1;
596
597 if (setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, &ka, sizeof(ka)) < 0)
598 - fprintf(stderr, "unable to set SO_KEEPALIVE on socket: %s\n",
599 - strerror(errno));
598 + error_errno("unable to set SO_KEEPALIVE on socket");
599 }
600
601 #ifndef NO_IPV6
@@ -640,7 +639,7 @@ static int git_tcp_connect_sock(char *host, int flags)
639
640 gai = getaddrinfo(host, port, &hints, &ai);
641 if (gai)
643 - die("Unable to look up %s (port %s) (%s)", host, port, gai_strerror(gai));
642 + die("unable to look up %s (port %s) (%s)", host, port, gai_strerror(gai));
643
644 if (flags & CONNECT_VERBOSE)
645 fprintf(stderr, "done.\nConnecting to %s (port %s) ... ", host, port);
@@ -670,7 +669,7 @@ static int git_tcp_connect_sock(char *host, int flags)
669 enable_keepalive(sockfd);
670
671 if (flags & CONNECT_VERBOSE)
673 - fprintf(stderr, "done.\n");
672 + fprintf_ln(stderr, "done.");
673
674 strbuf_release(&error_message);
675
@@ -701,13 +700,13 @@ static int git_tcp_connect_sock(char *host, int flags)
700
701 he = gethostbyname(host);
702 if (!he)
704 - die("Unable to look up %s (%s)", host, hstrerror(h_errno));
703 + die("unable to look up %s (%s)", host, hstrerror(h_errno));
704 nport = strtoul(port, &ep, 10);
705 if ( ep == port || *ep ) {
706 /* Not numeric */
707 struct servent *se = getservbyname(port,"tcp");
708 if ( !se )
710 - die("Unknown port %s", port);
709 + die("unknown port %s", port);
710 nport = se->s_port;
711 }
712
@@ -745,7 +744,7 @@ static int git_tcp_connect_sock(char *host, int flags)
744 enable_keepalive(sockfd);
745
746 if (flags & CONNECT_VERBOSE)
748 - fprintf(stderr, "done.\n");
747 + fprintf_ln(stderr, "done.");
748
749 return sockfd;
750 }
@@ -921,7 +920,7 @@ static enum protocol parse_connect_url(const char *url_orig, char **ret_host,
920 path = strchr(end, separator);
921
922 if (!path || !*path)
924 - die("No path specified. See 'man git-pull' for valid url syntax");
923 + die("no path specified; see 'git help pull' for valid url syntax");
924
925 /*
926 * null-terminate hostname and point path to ~ for URL's like this:
convert.c
+3 -3
@@ -190,7 +190,7 @@ static enum eol output_eol(enum crlf_action crlf_action)
190 /* fall through */
191 return text_eol_is_crlf() ? EOL_CRLF : EOL_LF;
192 }
193 - warning("Illegal crlf_action %d\n", (int)crlf_action);
193 + warning("illegal crlf_action %d", (int)crlf_action);
194 return core_eol;
195 }
196
@@ -203,7 +203,7 @@ static void check_global_conv_flags_eol(const char *path, enum crlf_action crlf_
203 * CRLFs would not be restored by checkout
204 */
205 if (conv_flags & CONV_EOL_RNDTRP_DIE)
206 - die(_("CRLF would be replaced by LF in %s."), path);
206 + die(_("CRLF would be replaced by LF in %s"), path);
207 else if (conv_flags & CONV_EOL_RNDTRP_WARN)
208 warning(_("CRLF will be replaced by LF in %s.\n"
209 "The file will have its original line"
@@ -493,7 +493,7 @@ static int encode_to_worktree(const char *path, const char *src, size_t src_len,
493 &dst_len);
494 if (!dst) {
495 error("failed to encode '%s' from %s to %s",
496 - path, default_encoding, enc);
496 + path, default_encoding, enc);
497 return 0;
498 }
499
diff.c
+2 -2
@@ -1863,8 +1863,8 @@ static void init_diff_words_data(struct emit_callback *ecbdata,
1863 if (regcomp(ecbdata->diff_words->word_regex,
1864 o->word_regex,
1865 REG_EXTENDED | REG_NEWLINE))
1866 - die ("Invalid regular expression: %s",
1867 - o->word_regex);
1866 + die("invalid regular expression: %s",
1867 + o->word_regex);
1868 }
1869 for (i = 0; i < ARRAY_SIZE(diff_words_styles); i++) {
1870 if (o->word_diff == diff_words_styles[i].type) {
dir.c
+2 -2
@@ -560,7 +560,7 @@ int report_path_error(const char *ps_matched,
560 if (found_dup)
561 continue;
562
563 - error("pathspec '%s' did not match any file(s) known to git.",
563 + error("pathspec '%s' did not match any file(s) known to git",
564 pathspec->items[num].original);
565 errors++;
566 }
@@ -2230,7 +2230,7 @@ static struct untracked_cache_dir *validate_untracked_cache(struct dir_struct *d
2230 return NULL;
2231
2232 if (!ident_in_untracked(dir->untracked)) {
2233 - warning(_("Untracked cache is disabled on this system or location."));
2233 + warning(_("untracked cache is disabled on this system or location"));
2234 return NULL;
2235 }
2236
pkt-line.c
+1 -1
@@ -296,7 +296,7 @@ static int get_packet_data(int fd, char **src_buf, size_t *src_size,
296 if (options & PACKET_READ_GENTLE_ON_EOF)
297 return -1;
298
299 - die("The remote end hung up unexpectedly");
299 + die("the remote end hung up unexpectedly");
300 }
301
302 return ret;
reflog-walk.c
+2 -2
@@ -128,7 +128,7 @@ int add_reflog_for_walk(struct reflog_walk_info *info,
128 enum selector_type selector = SELECTOR_NONE;
129
130 if (commit->object.flags & UNINTERESTING)
131 - die ("Cannot walk reflogs for %s", name);
131 + die("cannot walk reflogs for %s", name);
132
133 branch = xstrdup(name);
134 if (at && at[1] == '{') {
@@ -153,7 +153,7 @@ int add_reflog_for_walk(struct reflog_walk_info *info,
153 free(branch);
154 branch = resolve_refdup("HEAD", 0, NULL, NULL);
155 if (!branch)
156 - die ("No current branch");
156 + die("no current branch");
157
158 }
159 reflogs = read_complete_reflog(branch);
refs.c
+6 -6
@@ -567,9 +567,9 @@ int expand_ref(const char *str, int len, struct object_id *oid, char **ref)
567 if (!warn_ambiguous_refs)
568 break;
569 } else if ((flag & REF_ISSYMREF) && strcmp(fullref.buf, "HEAD")) {
570 - warning("ignoring dangling symref %s.", fullref.buf);
570 + warning("ignoring dangling symref %s", fullref.buf);
571 } else if ((flag & REF_ISBROKEN) && strchr(fullref.buf, '/')) {
572 - warning("ignoring broken ref %s.", fullref.buf);
572 + warning("ignoring broken ref %s", fullref.buf);
573 }
574 }
575 strbuf_release(&fullref);
@@ -871,13 +871,13 @@ static int read_ref_at_ent(struct object_id *ooid, struct object_id *noid,
871 if (!is_null_oid(&cb->ooid)) {
872 oidcpy(cb->oid, noid);
873 if (oidcmp(&cb->ooid, noid))
874 - warning("Log for ref %s has gap after %s.",
874 + warning("log for ref %s has gap after %s",
875 cb->refname, show_date(cb->date, cb->tz, DATE_MODE(RFC2822)));
876 }
877 else if (cb->date == cb->at_time)
878 oidcpy(cb->oid, noid);
879 else if (oidcmp(noid, cb->oid))
880 - warning("Log for ref %s unexpectedly ended on %s.",
880 + warning("log for ref %s unexpectedly ended on %s",
881 cb->refname, show_date(cb->date, cb->tz,
882 DATE_MODE(RFC2822)));
883 oidcpy(&cb->ooid, ooid);
@@ -935,7 +935,7 @@ int read_ref_at(const char *refname, unsigned int flags, timestamp_t at_time, in
935 if (flags & GET_OID_QUIETLY)
936 exit(128);
937 else
938 - die("Log for %s is empty.", refname);
938 + die("log for %s is empty", refname);
939 }
940 if (cb.found_it)
941 return 0;
@@ -1845,7 +1845,7 @@ int ref_update_reject_duplicates(struct string_list *refnames,
1845
1846 if (!cmp) {
1847 strbuf_addf(err,
1848 - "multiple updates for ref '%s' not allowed.",
1848 + "multiple updates for ref '%s' not allowed",
1849 refnames->items[i].string);
1850 return 1;
1851 } else if (cmp > 0) {
refspec.c
+1 -1
@@ -134,7 +134,7 @@ void refspec_item_init_or_die(struct refspec_item *item, const char *refspec,
134 int fetch)
135 {
136 if (!refspec_item_init(item, refspec, fetch))
137 - die("Invalid refspec '%s'", refspec);
137 + die("invalid refspec '%s'", refspec);
138 }
139
140 void refspec_item_clear(struct refspec_item *item)
sequencer.c
+4 -4
@@ -306,7 +306,7 @@ static const char *action_name(const struct replay_opts *opts)
306 case REPLAY_INTERACTIVE_REBASE:
307 return N_("rebase -i");
308 }
309 - die(_("Unknown action: %d"), opts->action);
309 + die(_("unknown action: %d"), opts->action);
310 }
311
312 struct commit_message {
@@ -1444,7 +1444,7 @@ static const char *command_to_string(const enum todo_command command)
1444 {
1445 if (command < TODO_COMMENT)
1446 return todo_command_info[command].str;
1447 - die("Unknown command: %d", command);
1447 + die("unknown command: %d", command);
1448 }
1449
1450 static char command_to_char(const enum todo_command command)
@@ -2608,7 +2608,7 @@ static int error_with_patch(struct commit *commit,
2608 "\n"
2609 " git rebase --continue\n", gpg_sign_opt_quoted(opts));
2610 } else if (exit_code)
2611 - fprintf(stderr, "Could not apply %s... %.*s\n",
2611 + fprintf_ln(stderr, "Could not apply %s... %.*s",
2612 short_commit_name(commit), subject_len, subject);
2613
2614 return exit_code;
@@ -2719,7 +2719,7 @@ static int do_label(const char *name, int len)
2719 struct object_id head_oid;
2720
2721 if (len == 1 && *name == '#')
2722 - return error("Illegal label name: '%.*s'", len, name);
2722 + return error("illegal label name: '%.*s'", len, name);
2723
2724 strbuf_addf(&ref_name, "refs/rewritten/%.*s", len, name);
2725 strbuf_addf(&msg, "rebase -i (label) '%.*s'", len, name);
sha1-file.c
+4 -4
@@ -71,17 +71,17 @@ static void git_hash_sha1_final(unsigned char *hash, git_hash_ctx *ctx)
71
72 static void git_hash_unknown_init(git_hash_ctx *ctx)
73 {
74 - die("trying to init unknown hash");
74 + BUG("trying to init unknown hash");
75 }
76
77 static void git_hash_unknown_update(git_hash_ctx *ctx, const void *data, size_t len)
78 {
79 - die("trying to update unknown hash");
79 + BUG("trying to update unknown hash");
80 }
81
82 static void git_hash_unknown_final(unsigned char *hash, git_hash_ctx *ctx)
83 {
84 - die("trying to finalize unknown hash");
84 + BUG("trying to finalize unknown hash");
85 }
86
87 const struct git_hash_algo hash_algos[GIT_HASH_NALGOS] = {
@@ -379,7 +379,7 @@ static int alt_odb_usable(struct raw_object_store *o,
379 /* Detect cases where alternate disappeared */
380 if (!is_directory(path->buf)) {
381 error("object directory %s does not exist; "
382 - "check .git/objects/info/alternates.",
382 + "check .git/objects/info/alternates",
383 path->buf);
384 return 0;
385 }
t/t1400-update-ref.sh
+4 -4
@@ -390,7 +390,7 @@ test_expect_success 'Query "master@{2005-05-26 23:33:01}" (middle of history wit
390 test_when_finished "rm -f o e" &&
391 git rev-parse --verify "master@{2005-05-26 23:33:01}" >o 2>e &&
392 test $B = $(cat o) &&
393 - test "warning: Log for ref $m has gap after $gd." = "$(cat e)"
393 + test "warning: log for ref $m has gap after $gd" = "$(cat e)"
394 '
395 test_expect_success 'Query "master@{2005-05-26 23:38:00}" (middle of history)' '
396 test_when_finished "rm -f o e" &&
@@ -408,7 +408,7 @@ test_expect_success 'Query "master@{2005-05-28}" (past end of history)' '
408 test_when_finished "rm -f o e" &&
409 git rev-parse --verify "master@{2005-05-28}" >o 2>e &&
410 test $D = $(cat o) &&
411 - test "warning: Log for ref $m unexpectedly ended on $ld." = "$(cat e)"
411 + test "warning: log for ref $m unexpectedly ended on $ld" = "$(cat e)"
412 '
413
414 rm -f .git/$m .git/logs/$m expect
@@ -650,7 +650,7 @@ test_expect_success 'stdin fails with duplicate refs' '
650 create $a $m
651 EOF
652 test_must_fail git update-ref --stdin <stdin 2>err &&
653 - grep "fatal: multiple updates for ref '"'"'$a'"'"' not allowed." err
653 + grep "fatal: multiple updates for ref '"'"'$a'"'"' not allowed" err
654 '
655
656 test_expect_success 'stdin create ref works' '
@@ -1052,7 +1052,7 @@ test_expect_success 'stdin -z fails option with unknown name' '
1052 test_expect_success 'stdin -z fails with duplicate refs' '
1053 printf $F "create $a" "$m" "create $b" "$m" "create $a" "$m" >stdin &&
1054 test_must_fail git update-ref -z --stdin <stdin 2>err &&
1055 - grep "fatal: multiple updates for ref '"'"'$a'"'"' not allowed." err
1055 + grep "fatal: multiple updates for ref '"'"'$a'"'"' not allowed" err
1056 '
1057
1058 test_expect_success 'stdin -z create ref works' '
t/t3005-ls-files-relative.sh
+2 -2
@@ -44,7 +44,7 @@ test_expect_success 'ls-files -c' '
44 cd top/sub &&
45 for f in ../y*
46 do
47 - echo "error: pathspec $sq$f$sq did not match any file(s) known to git."
47 + echo "error: pathspec $sq$f$sq did not match any file(s) known to git"
48 done >expect.err &&
49 echo "Did you forget to ${sq}git add${sq}?" >>expect.err &&
50 ls ../x* >expect.out &&
@@ -59,7 +59,7 @@ test_expect_success 'ls-files -o' '
59 cd top/sub &&
60 for f in ../x*
61 do
62 - echo "error: pathspec $sq$f$sq did not match any file(s) known to git."
62 + echo "error: pathspec $sq$f$sq did not match any file(s) known to git"
63 done >expect.err &&
64 echo "Did you forget to ${sq}git add${sq}?" >>expect.err &&
65 ls ../y* >expect.out &&
t/t5801-remote-helpers.sh
+3 -3
@@ -126,7 +126,7 @@ test_expect_success 'forced push' '
126 test_expect_success 'cloning without refspec' '
127 GIT_REMOTE_TESTGIT_REFSPEC="" \
128 git clone "testgit::${PWD}/server" local2 2>error &&
129 - grep "This remote helper should implement refspec capability" error &&
129 + grep "this remote helper should implement refspec capability" error &&
130 compare_refs local2 HEAD server HEAD
131 '
132
@@ -134,7 +134,7 @@ test_expect_success 'pulling without refspecs' '
134 (cd local2 &&
135 git reset --hard &&
136 GIT_REMOTE_TESTGIT_REFSPEC="" git pull 2>../error) &&
137 - grep "This remote helper should implement refspec capability" error &&
137 + grep "this remote helper should implement refspec capability" error &&
138 compare_refs local2 HEAD server HEAD
139 '
140
@@ -246,7 +246,7 @@ test_expect_success 'proper failure checks for fetching' '
246 (cd local &&
247 test_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 git fetch 2>error &&
248 cat error &&
249 - grep -q "Error while running fast-import" error
249 + grep -q "error while running fast-import" error
250 )
251 '
252
t/t7063-status-untracked-cache.sh
+1 -1
@@ -666,7 +666,7 @@ test_expect_success 'test ident field is working' '
666 mkdir ../other_worktree &&
667 cp -R done dthree dtwo four three ../other_worktree &&
668 GIT_WORK_TREE=../other_worktree git status 2>../err &&
669 - echo "warning: Untracked cache is disabled on this system or location." >../expect &&
669 + echo "warning: untracked cache is disabled on this system or location" >../expect &&
670 test_i18ncmp ../expect ../err
671 '
672
transport-helper.c
+24 -24
@@ -48,7 +48,7 @@ static void sendline(struct helper_data *helper, struct strbuf *buffer)
48 if (debug)
49 fprintf(stderr, "Debug: Remote helper: -> %s", buffer->buf);
50 if (write_in_full(helper->helper->in, buffer->buf, buffer->len) < 0)
51 - die_errno("Full write to remote helper failed");
51 + die_errno("full write to remote helper failed");
52 }
53
54 static int recvline_fh(FILE *helper, struct strbuf *buffer)
@@ -77,7 +77,7 @@ static void write_constant(int fd, const char *str)
77 if (debug)
78 fprintf(stderr, "Debug: Remote helper: -> %s", str);
79 if (write_in_full(fd, str, strlen(str)) < 0)
80 - die_errno("Full write to remote helper failed");
80 + die_errno("full write to remote helper failed");
81 }
82
83 static const char *remove_ext_force(const char *url)
@@ -129,7 +129,7 @@ static struct child_process *get_helper(struct transport *transport)
129
130 code = start_command(helper);
131 if (code < 0 && errno == ENOENT)
132 - die("Unable to find remote helper for '%s'", data->name);
132 + die("unable to find remote helper for '%s'", data->name);
133 else if (code != 0)
134 exit(code);
135
@@ -145,7 +145,7 @@ static struct child_process *get_helper(struct transport *transport)
145 */
146 duped = dup(helper->out);
147 if (duped < 0)
148 - die_errno("Can't dup helper output fd");
148 + die_errno("can't dup helper output fd");
149 data->out = xfdopen(duped, "r");
150
151 write_constant(helper->in, "capabilities\n");
@@ -196,13 +196,13 @@ static struct child_process *get_helper(struct transport *transport)
196 } else if (starts_with(capname, "no-private-update")) {
197 data->no_private_update = 1;
198 } else if (mandatory) {
199 - die("Unknown mandatory capability %s. This remote "
200 - "helper probably needs newer version of Git.",
199 + die("unknown mandatory capability %s; this remote "
200 + "helper probably needs newer version of Git",
201 capname);
202 }
203 }
204 if (!data->rs.nr && (data->import || data->bidi_import || data->export)) {
205 - warning("This remote helper should implement refspec capability.");
205 + warning("this remote helper should implement refspec capability");
206 }
207 strbuf_release(&buf);
208 if (debug)
@@ -476,7 +476,7 @@ static int fetch_with_import(struct transport *transport,
476 get_helper(transport);
477
478 if (get_importer(transport, &fastimport))
479 - die("Couldn't run fast-import");
479 + die("couldn't run fast-import");
480
481 for (i = 0; i < nr_heads; i++) {
482 posn = to_fetch[i];
@@ -499,7 +499,7 @@ static int fetch_with_import(struct transport *transport,
499 */
500
501 if (finish_command(&fastimport))
502 - die("Error while running fast-import");
502 + die("error while running fast-import");
503
504 /*
505 * The fast-import stream of a remote helper that advertises
@@ -528,7 +528,7 @@ static int fetch_with_import(struct transport *transport,
528 private = xstrdup(name);
529 if (private) {
530 if (read_ref(private, &posn->old_oid) < 0)
531 - die("Could not read ref %s", private);
531 + die("could not read ref %s", private);
532 free(private);
533 }
534 }
@@ -554,7 +554,7 @@ static int run_connect(struct transport *transport, struct strbuf *cmdbuf)
554 */
555 duped = dup(helper->out);
556 if (duped < 0)
557 - die_errno("Can't dup helper output fd");
557 + die_errno("can't dup helper output fd");
558 input = xfdopen(duped, "r");
559 setvbuf(input, NULL, _IONBF, 0);
560
@@ -573,7 +573,7 @@ static int run_connect(struct transport *transport, struct strbuf *cmdbuf)
573 fprintf(stderr, "Debug: Falling back to dumb "
574 "transport.\n");
575 } else {
576 - die("Unknown response to connect: %s",
576 + die("unknown response to connect: %s",
577 cmdbuf->buf);
578 }
579
@@ -595,9 +595,9 @@ static int process_connect_service(struct transport *transport,
595 if (strcmp(name, exec)) {
596 int r = set_helper_option(transport, "servpath", exec);
597 if (r > 0)
598 - warning("Setting remote service path not supported by protocol.");
598 + warning("setting remote service path not supported by protocol");
599 else if (r < 0)
600 - warning("Invalid remote service path.");
600 + warning("invalid remote service path");
601 }
602
603 if (data->connect) {
@@ -640,10 +640,10 @@ static int connect_helper(struct transport *transport, const char *name,
640 /* Get_helper so connect is inited. */
641 get_helper(transport);
642 if (!data->connect)
643 - die("Operation not supported by protocol.");
643 + die("operation not supported by protocol");
644
645 if (!process_connect_service(transport, name, exec))
646 - die("Can't connect to subservice %s.", name);
646 + die("can't connect to subservice %s", name);
647
648 fd[0] = data->helper->out;
649 fd[1] = data->helper->in;
@@ -978,12 +978,12 @@ static int push_refs_with_export(struct transport *transport,
978 }
979
980 if (get_exporter(transport, &exporter, &revlist_args))
981 - die("Couldn't run fast-export");
981 + die("couldn't run fast-export");
982
983 string_list_clear(&revlist_args, 1);
984
985 if (finish_command(&exporter))
986 - die("Error while running fast-export");
986 + die("error while running fast-export");
987 if (push_update_refs_status(data, remote_refs, flags))
988 return 1;
989
@@ -1070,7 +1070,7 @@ static struct ref *get_refs_list(struct transport *transport, int for_push,
1070
1071 eov = strchr(buf.buf, ' ');
1072 if (!eov)
1073 - die("Malformed response in ref list: %s", buf.buf);
1073 + die("malformed response in ref list: %s", buf.buf);
1074 eon = strchr(eov + 1, ' ');
1075 *eov = '\0';
1076 if (eon)
@@ -1084,7 +1084,7 @@ static struct ref *get_refs_list(struct transport *transport, int for_push,
1084 if (has_attribute(eon + 1, "unchanged")) {
1085 (*tail)->status |= REF_STATUS_UPTODATE;
1086 if (read_ref((*tail)->name, &(*tail)->old_oid) < 0)
1087 - die(_("Could not read ref %s"),
1087 + die(_("could not read ref %s"),
1088 (*tail)->name);
1089 }
1090 }
@@ -1322,11 +1322,11 @@ static int tloop_spawnwait_tasks(struct bidirectional_transfer_state *s)
1322 err = pthread_create(&gtp_thread, NULL, udt_copy_task_routine,
1323 &s->gtp);
1324 if (err)
1325 - die("Can't start thread for copying data: %s", strerror(err));
1325 + die("can't start thread for copying data: %s", strerror(err));
1326 err = pthread_create(&ptg_thread, NULL, udt_copy_task_routine,
1327 &s->ptg);
1328 if (err)
1329 - die("Can't start thread for copying data: %s", strerror(err));
1329 + die("can't start thread for copying data: %s", strerror(err));
1330
1331 ret |= tloop_join(gtp_thread, "Git to program copy");
1332 ret |= tloop_join(ptg_thread, "Program to git copy");
@@ -1385,7 +1385,7 @@ static int tloop_spawnwait_tasks(struct bidirectional_transfer_state *s)
1385 /* Fork thread #1: git to program. */
1386 pid1 = fork();
1387 if (pid1 < 0)
1388 - die_errno("Can't start thread for copying data");
1388 + die_errno("can't start thread for copying data");
1389 else if (pid1 == 0) {
1390 udt_kill_transfer(&s->ptg);
1391 exit(udt_copy_task_routine(&s->gtp) ? 0 : 1);
@@ -1394,7 +1394,7 @@ static int tloop_spawnwait_tasks(struct bidirectional_transfer_state *s)
1394 /* Fork thread #2: program to git. */
1395 pid2 = fork();
1396 if (pid2 < 0)
1397 - die_errno("Can't start thread for copying data");
1397 + die_errno("can't start thread for copying data");
1398 else if (pid2 == 0) {
1399 udt_kill_transfer(&s->gtp);
1400 exit(udt_copy_task_routine(&s->ptg) ? 0 : 1);
transport.c
+4 -4
@@ -139,7 +139,7 @@ static struct ref *get_refs_from_bundle(struct transport *transport,
139 close(data->fd);
140 data->fd = read_bundle_header(transport->url, &data->header);
141 if (data->fd < 0)
142 - die ("Could not read bundle '%s'.", transport->url);
142 + die("could not read bundle '%s'", transport->url);
143 for (i = 0; i < data->header.references.nr; i++) {
144 struct ref_list_entry *e = data->header.references.list + i;
145 struct ref *ref = alloc_ref(e->name);
@@ -875,7 +875,7 @@ struct transport *transport_get(struct remote *remote, const char *url)
875 ret->progress = isatty(2);
876
877 if (!remote)
878 - die("No remote provided to transport_get()");
878 + BUG("No remote provided to transport_get()");
879
880 ret->got_remote_refs = 0;
881 ret->remote = remote;
@@ -1143,7 +1143,7 @@ int transport_push(struct transport *transport,
1143 transport->push_options,
1144 pretend)) {
1145 oid_array_clear(&commits);
1146 - die("Failed to push all needed submodules!");
1146 + die("failed to push all needed submodules!");
1147 }
1148 oid_array_clear(&commits);
1149 }
@@ -1265,7 +1265,7 @@ int transport_connect(struct transport *transport, const char *name,
1265 if (transport->vtable->connect)
1266 return transport->vtable->connect(transport, name, exec, fd);
1267 else
1268 - die("Operation not supported by protocol");
1268 + die("operation not supported by protocol");
1269 }
1270
1271 int transport_disconnect(struct transport *transport)