Reroute the output of stdout to stderr as it is just informative
messages, not to be consumed by machines.

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 <sbel...@google.com>
---
 builtin/submodule--helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index d942463..a69b1f4 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -268,7 +268,8 @@ 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);
        }
 
-- 
2.7.0.rc0.45.g6b4c145

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to