From: Stefan Beller Date: Tue, 22 Mar 2016 02:06:09 GMT Subject: [RFC_PATCHv4 4/7] submodule init: redirect stdout to stderr Message-ID: <1458612372-10966-5-git-send-email-sbeller@google.com> In-Reply-To: <1458612372-10966-1-git-send-email-sbeller@google.com> 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 --- 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