diff options
| author | Jeff King <peff@peff.net> | 2024-09-05 04:51:49 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-09-05 09:07:12 -0700 |
| commit | 1a60f2066aadf68391aed69f4d5914d914b60f5b (patch) | |
| tree | 3f95d066dcae08cb04c0f51f91fc3d5168ffc679 /builtin/bisect.c | |
| parent | 2e7b89e038c0c888acf61f1b4ee5a43d4dd5e94c (diff) | |
drop trailing newline from warning/error/die messages
Our error reporting routines append a trailing newline, and the strings
we pass to them should not include them (otherwise we get an extra blank
line after the message).
These cases were all found by looking at the results of:
git grep -P '[^_](error|error_errno|warning|die|die_errno)\(.*\\n"[,)]' '*.c'
Note that we _do_ sometimes include a newline in the middle of such
messages, to create multiline output (hence our grep matching "," or ")"
after we see the newline, so we know we're at the end of the string).
It's possible that one or more of these cases could intentionally be
including a blank line at the end, but having looked at them all
manually, I think these are all just mistakes.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/bisect.c')
| -rw-r--r-- | builtin/bisect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/bisect.c b/builtin/bisect.c index 453a6cccd7..c8aa92b19d 100644 --- a/builtin/bisect.c +++ b/builtin/bisect.c @@ -583,7 +583,7 @@ static int prepare_revs(struct bisect_terms *terms, struct rev_info *revs) refs_for_each_glob_ref_in(get_main_ref_store(the_repository), add_bisect_ref, good, "refs/bisect/", &cb); if (prepare_revision_walk(revs)) - res = error(_("revision walk setup failed\n")); + res = error(_("revision walk setup failed")); free(good); free(bad); @@ -1108,7 +1108,7 @@ static enum bisect_error bisect_skip(struct bisect_terms *terms, int argc, setup_revisions(2, argv + i - 1, &revs, NULL); if (prepare_revision_walk(&revs)) - die(_("revision walk setup failed\n")); + die(_("revision walk setup failed")); while ((commit = get_revision(&revs)) != NULL) strvec_push(&argv_state, oid_to_hex(&commit->object.oid)); |
