From fbf71645d12d30219e88598c4867ef7c2fe48cee Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Tue, 15 Dec 2015 16:04:06 -0800 Subject: submodule.c: write "Fetching submodule " to stderr The "Pushing submodule " progress output correctly goes to stderr, but "Fetching submodule " is going to stdout by mistake. Fix it to write to stderr. Noticed while trying to implement a parallel submodule fetch. When this particular output line went to a different file descriptor, it was buffered separately, resulting in wrongly interleaved output if we copied it to the terminal naively. Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- submodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'submodule.c') diff --git a/submodule.c b/submodule.c index 14e76247bf..8386477d62 100644 --- a/submodule.c +++ b/submodule.c @@ -689,7 +689,7 @@ int fetch_populated_submodules(const struct argv_array *options, git_dir = submodule_git_dir.buf; if (is_directory(git_dir)) { if (!quiet) - printf("Fetching submodule %s%s\n", prefix, ce->name); + fprintf(stderr, "Fetching submodule %s%s\n", prefix, ce->name); cp.dir = submodule_path.buf; argv_array_push(&argv, default_argv); argv_array_push(&argv, "--submodule-prefix"); -- cgit v1.2.1