git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] submodule: add newline on invalid submodule error

From
Emily Shaffer <emilyshaffer@google.com>
Date
Feb 7, 2020, 00:48 UTC
Message-ID
<20200207004833.255965-1-emilyshaffer@google.com>

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>
---
 submodule.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/submodule.c b/submodule.c
index 3a184b66ab..d63f4476d9 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1480,7 +1480,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);
 			}
 		}
-- 
2.25.0.341.g760bfbb309-goog
Next: Derrick Stolee
Message 1 of 2 in “submodule: add newline on invalid submodule error”
  1. submodule: add newline on invalid submodule errorEmily Shaffer, Feb 7, 2020
  2. Derrick StoleeFeb 7, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.