aboutsummaryrefslogtreecommitdiffstats
path: root/negotiator/skipping.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2024-09-05 04:51:49 -0400
committerJunio C Hamano <gitster@pobox.com>2024-09-05 09:07:12 -0700
commit1a60f2066aadf68391aed69f4d5914d914b60f5b (patch)
tree3f95d066dcae08cb04c0f51f91fc3d5168ffc679 /negotiator/skipping.c
parent2e7b89e038c0c888acf61f1b4ee5a43d4dd5e94c (diff)
downloadgit-1a60f2066aadf68391aed69f4d5914d914b60f5b.tar.gz
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 'negotiator/skipping.c')
-rw-r--r--negotiator/skipping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/negotiator/skipping.c b/negotiator/skipping.c
index f65d47858b..6e61b3c5f1 100644
--- a/negotiator/skipping.c
+++ b/negotiator/skipping.c
@@ -239,7 +239,7 @@ static int ack(struct fetch_negotiator *n, struct commit *c)
{
int known_to_be_common = !!(c->object.flags & COMMON);
if (!(c->object.flags & SEEN))
- die("received ack for commit %s not sent as 'have'\n",
+ die("received ack for commit %s not sent as 'have'",
oid_to_hex(&c->object.oid));
mark_common(n->data, c);
return known_to_be_common;