summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2015-12-16 00:04:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-12-16 20:06:08 (GMT)
commitfbf71645d12d30219e88598c4867ef7c2fe48cee (patch)
tree95dcd6f64c8111ec096e05449c7c59db453b6f82 /submodule.c
parent4b9ab0ee0130090c63da2df83747b7b1d834ad98 (diff)
downloadgit-fbf71645d12d30219e88598c4867ef7c2fe48cee.zip
git-fbf71645d12d30219e88598c4867ef7c2fe48cee.tar.gz
git-fbf71645d12d30219e88598c4867ef7c2fe48cee.tar.bz2
submodule.c: write "Fetching submodule <foo>" to stderr
The "Pushing submodule <foo>" progress output correctly goes to stderr, but "Fetching submodule <foo>" 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 <jrnieder@gmail.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/submodule.c b/submodule.c
index 14e7624..8386477 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");