From: Jeff King Date: Thu, 7 Jul 2022 23:54:51 +0000 (-0400) Subject: clone: drop extra newline from warning message X-Git-Tag: v2.37.2~20^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f77710c5045c3e38ae440c843cb07af9e5000b6c;p=thirdparty%2Fgit.git clone: drop extra newline from warning message We don't need to put a "\n" in calls to warning(), since it adds one itself (and the user sees an extra blank line). Drop it, and while we're here, drop the full-stop from the message, which goes against our guidelines. This bug dates all the way back to 8434c2f1af (Build in clone, 2008-04-27), but presumably nobody noticed because it's hard to trigger: you have to clone a repository whose HEAD is unborn, but which is not otherwise empty. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/builtin/clone.c b/builtin/clone.c index 194d50f75f..3baf1acc3c 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -672,7 +672,7 @@ static int checkout(int submodule_progress, int filter_submodules) head = resolve_refdup("HEAD", RESOLVE_REF_READING, &oid, NULL); if (!head) { warning(_("remote HEAD refers to nonexistent ref, " - "unable to checkout.\n")); + "unable to checkout")); return 0; } if (!strcmp(head, "HEAD")) {