]> git.ipfire.org Git - thirdparty/git.git/commitdiff
clone: drop extra newline from warning message
authorJeff King <peff@peff.net>
Thu, 7 Jul 2022 23:54:51 +0000 (19:54 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 8 Jul 2022 03:57:54 +0000 (20:57 -0700)
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/clone.c

index 194d50f75f337edf30d9044a676cdbd4ce0d536d..3baf1acc3cb2b22688d06b39a0fd8316206a47e0 100644 (file)
@@ -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")) {