]> git.ipfire.org Git - thirdparty/git.git/commitdiff
submodule: add newline on invalid submodule error
authorEmily Shaffer <emilyshaffer@google.com>
Fri, 7 Feb 2020 00:48:33 +0000 (16:48 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 7 Feb 2020 19:05:45 +0000 (11:05 -0800)
Since 'err' contains output for multiple submodules and is printed all
at once by fetch_populated_submodules(), errors for each submodule
should be newline separated for readability. The same strbuf is added to
with a newline in the other half of the conditional where this error is
detected, so make the two consistent.

Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
submodule.c

index 9da7181321f089e8450ec7e39692f7928f5638a8..a2e2239eace49860f296875536f3a389ad288959 100644 (file)
@@ -1478,7 +1478,7 @@ static int get_next_submodule(struct child_process *cp,
                            !is_empty_dir(ce->name)) {
                                spf->result = 1;
                                strbuf_addf(err,
-                                           _("Could not access submodule '%s'"),
+                                           _("Could not access submodule '%s'\n"),
                                            ce->name);
                        }
                }