Skip to content

Commit b64f249

Browse files
committed
Merge branch 'jk/messages-with-excess-lf-fix'
One-line messages to "die" and other helper functions will get LF added by these helper functions, but many existing messages had an unnecessary LF at the end, which have been corrected. * jk/messages-with-excess-lf-fix: drop trailing newline from warning/error/die messages
2 parents 143682e + 1a60f20 commit b64f249

File tree

12 files changed

+22
-22
lines changed

12 files changed

+22
-22
lines changed

builtin/bisect.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ static int prepare_revs(struct bisect_terms *terms, struct rev_info *revs)
583583
refs_for_each_glob_ref_in(get_main_ref_store(the_repository),
584584
add_bisect_ref, good, "refs/bisect/", &cb);
585585
if (prepare_revision_walk(revs))
586-
res = error(_("revision walk setup failed\n"));
586+
res = error(_("revision walk setup failed"));
587587

588588
free(good);
589589
free(bad);
@@ -1108,7 +1108,7 @@ static enum bisect_error bisect_skip(struct bisect_terms *terms, int argc,
11081108
setup_revisions(2, argv + i - 1, &revs, NULL);
11091109

11101110
if (prepare_revision_walk(&revs))
1111-
die(_("revision walk setup failed\n"));
1111+
die(_("revision walk setup failed"));
11121112
while ((commit = get_revision(&revs)) != NULL)
11131113
strvec_push(&argv_state,
11141114
oid_to_hex(&commit->object.oid));

builtin/fetch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@ static int store_updated_refs(struct display_state *display_state,
11611161
opt.exclude_hidden_refs_section = "fetch";
11621162
rm = ref_map;
11631163
if (check_connected(iterate_ref_map, &rm, &opt)) {
1164-
rc = error(_("%s did not send all necessary objects\n"),
1164+
rc = error(_("%s did not send all necessary objects"),
11651165
display_state->url);
11661166
goto abort;
11671167
}
@@ -1458,7 +1458,7 @@ static void set_option(struct transport *transport, const char *name, const char
14581458
die(_("option \"%s\" value \"%s\" is not valid for %s"),
14591459
name, value, transport->url);
14601460
if (r > 0)
1461-
warning(_("option \"%s\" is ignored for %s\n"),
1461+
warning(_("option \"%s\" is ignored for %s"),
14621462
name, transport->url);
14631463
}
14641464

builtin/stash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ static void unstage_changes_unless_new(struct object_id *orig_tree)
484484
" to make room.\n"),
485485
ce->name, new_path.buf);
486486
if (rename(ce->name, new_path.buf))
487-
die("Failed to move %s to %s\n",
487+
die("Failed to move %s to %s",
488488
ce->name, new_path.buf);
489489
strbuf_release(&new_path);
490490
}

builtin/submodule--helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ static void generate_submodule_summary(struct summary_cb *info,
917917
} else {
918918
/* for a submodule removal (mode:0000000), don't warn */
919919
if (p->mod_dst)
920-
warning(_("unexpected mode %o\n"), p->mod_dst);
920+
warning(_("unexpected mode %o"), p->mod_dst);
921921
}
922922
}
923923

fetch-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1614,7 +1614,7 @@ static void receive_packfile_uris(struct packet_reader *reader,
16141614
while (packet_reader_read(reader) == PACKET_READ_NORMAL) {
16151615
if (reader->pktlen < the_hash_algo->hexsz ||
16161616
reader->line[the_hash_algo->hexsz] != ' ')
1617-
die("expected '<hash> <uri>', got: %s\n", reader->line);
1617+
die("expected '<hash> <uri>', got: %s", reader->line);
16181618

16191619
string_list_append(uris, reader->line);
16201620
}

loose.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ int repo_write_loose_object_map(struct repository *repo)
162162
errout:
163163
rollback_lock_file(&lock);
164164
strbuf_release(&buf);
165-
error_errno(_("failed to write loose object index %s\n"), path.buf);
165+
error_errno(_("failed to write loose object index %s"), path.buf);
166166
strbuf_release(&path);
167167
return -1;
168168
}
@@ -197,7 +197,7 @@ static int write_one_object(struct repository *repo, const struct object_id *oid
197197
strbuf_release(&path);
198198
return 0;
199199
errout:
200-
error_errno(_("failed to write loose object index %s\n"), path.buf);
200+
error_errno(_("failed to write loose object index %s"), path.buf);
201201
close(fd);
202202
rollback_lock_file(&lock);
203203
strbuf_release(&buf);

negotiator/skipping.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ static int ack(struct fetch_negotiator *n, struct commit *c)
239239
{
240240
int known_to_be_common = !!(c->object.flags & COMMON);
241241
if (!(c->object.flags & SEEN))
242-
die("received ack for commit %s not sent as 'have'\n",
242+
die("received ack for commit %s not sent as 'have'",
243243
oid_to_hex(&c->object.oid));
244244
mark_common(n->data, c);
245245
return known_to_be_common;

send-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ int send_pack(struct send_pack_args *args,
626626
strbuf_release(&req_buf);
627627
strbuf_release(&cap_buf);
628628
reject_atomic_push(remote_refs, args->send_mirror);
629-
error("atomic push failed for ref %s. status: %d\n",
629+
error("atomic push failed for ref %s. status: %d",
630630
ref->name, ref->status);
631631
return args->porcelain ? 0 : -1;
632632
}

serve.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ static int process_request(void)
323323
die("no command requested");
324324

325325
if (client_hash_algo != hash_algo_by_ptr(the_repository->hash_algo))
326-
die("mismatched object format: server %s; client %s\n",
326+
die("mismatched object format: server %s; client %s",
327327
the_repository->hash_algo->name,
328328
hash_algos[client_hash_algo].name);
329329

t/helper/test-path-utils.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static void normalize_argv_string(const char **var, const char *input)
3838
*var = input;
3939

4040
if (*var && (**var == '<' || **var == '('))
41-
die("Bad value: %s\n", input);
41+
die("Bad value: %s", input);
4242
}
4343

4444
struct test_data {
@@ -78,12 +78,12 @@ static int test_function(struct test_data *data, char *(*func)(char *input),
7878
if (!strcmp(to, data[i].to))
7979
continue;
8080
if (!data[i].alternative)
81-
error("FAIL: %s(%s) => '%s' != '%s'\n",
81+
error("FAIL: %s(%s) => '%s' != '%s'",
8282
funcname, data[i].from, to, data[i].to);
8383
else if (!strcmp(to, data[i].alternative))
8484
continue;
8585
else
86-
error("FAIL: %s(%s) => '%s' != '%s', '%s'\n",
86+
error("FAIL: %s(%s) => '%s' != '%s', '%s'",
8787
funcname, data[i].from, to, data[i].to,
8888
data[i].alternative);
8989
failed = 1;

0 commit comments

Comments
 (0)