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

[PATCH 1/5] submodule init: Write submodule registration to stderr

From
Stefan Beller <sbeller@google.com>
Date
Jan 23, 2016, 00:31 UTC
Message-ID
<1453509103-16470-2-git-send-email-sbeller@google.com>
In-Reply-To
<1453509103-16470-1-git-send-email-sbeller@google.com>

The registration of the submodule will be reported to stderr, as that is consistent with the rest of progress reporting within Git.

This helps us in a later patch when we want to reuse the init_submodule function in update_clone whose stdout will be piped to shell which reads parameters off stdout in a very specific way.

Signed-off-by: Stefan Beller <sbeller@google.com>
---
 builtin/submodule--helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index c9b0c05..05c18a3 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -267,7 +267,7 @@ static void init_submodule(const char *path, const char *prefix, int quiet)
 			die(_("Failed to register url for submodule path '%s'"),
 			    displaypath);
 		if (!quiet)
-			printf(_("Submodule '%s' (%s) registered for path '%s'\n"),
+			fprintf(stderr, _("Submodule '%s' (%s) registered for path '%s'\n"),
 				sub->name, url, displaypath);
 		free(url);
 	}
-- 
2.7.0.rc0.42.g77a36b9.dirty
Previous: Stefan BellerNext: Stefan Beller
Message 2 of 14 in “[WAS: Submodule Groups] Labels and submodule.autoInitialize”
  1. 0/5 [WAS: Submodule Groups] Labels and submodule.autoInitializeStefan Beller, Jan 23, 2016
  2. 1/5 submodule init: Write submodule registration to stderrStefan Beller, Jan 23, 2016
  3. 2/5 git submodule: Teach add to label submodulesStefan Beller, Jan 23, 2016
  4. 3/5 submodule-config: keep labels aroundStefan Beller, Jan 23, 2016
  5. Sebastian SchuberthJan 24, 2016
  6. Stefan BellerJan 25, 2016
  7. 4/5 submodule update: respect submodule.autoInitializeStefan Beller, Jan 23, 2016
  8. 5/5 builtin/clone: Configure submodule.autoInitialize via --init-submoduleStefan Beller, Jan 23, 2016
  9. Jens LehmannJan 24, 2016
  10. Stefan BellerJan 25, 2016
  11. Jens LehmannJan 26, 2016
  12. Stefan BellerJan 26, 2016
  13. Jens LehmannJan 31, 2016
  14. Stefan BellerFeb 1, 2016

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.