path: root/builtin/submodule--helper.c
diff options
authorStefan Beller <>2016-05-02 22:24:04 (GMT)
committerJunio C Hamano <>2016-05-03 16:39:45 (GMT)
commitc66410ed32a807cefca6f679ad5583eda2e9527b (patch)
tree9cd7447cf882b34519bf4a4c8f59d0f833fc294d /builtin/submodule--helper.c
parent08fdbdb153c138f0a2dc85949475fafb20853d96 (diff)
submodule init: redirect stdout to stderr
Reroute the output of stdout to stderr as it is just informative messages, not to be consumed by machines. This should not regress any scripts that try to parse the current output, as the output is already internationalized and therefore unstable. We want to init submodules from the helper for `submodule update` in a later patch and the stdout output of said helper is consumed by the parts of `submodule update` which are still written in shell. So we have to be careful which messages are on stdout. Signed-off-by: Stefan Beller <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin/submodule--helper.c')
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 5d05393..7f0941d 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -366,7 +366,8 @@ static void init_submodule(const char *path, const char *prefix, int quiet)
die(_("Failed to register url for submodule path '%s'"),
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);