[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