Re: [PATCH 05/10] submodule add: send messages to stderr
From: Junio C Hamano <hidden>
Date: 2016-06-16 02:19:08
Stefan Beller [off-list ref] writes:
Reroute the output of stdout to stderr as it is just informative messages, not to be consumed by machines. This should not regress any scripts that try to parse the current output, as the output is already internationalized and therefore unstable. Signed-off-by: Stefan Beller <redacted> ---
Sounds sensible.
quoted hunk
git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/git-submodule.sh b/git-submodule.sh index d689265..f4d500e 100755 --- a/git-submodule.sh +++ b/git-submodule.sh@@ -271,7 +271,7 @@ Use -f if you really want to add it." >&2 echo >&2 "$(eval_gettext "use the '--force' option. If the local git directory is not the correct repo")" die "$(eval_gettext "or you are unsure what this means choose another name with the '--name' option.")" else - echo "$(eval_gettext "Reactivating local git directory for submodule '\$sm_name'.")" + echo >&2 "$(eval_gettext "Reactivating local git directory for submodule '\$sm_name'.")" fi fi git submodule--helper clone ${GIT_QUIET:+--quiet} --prefix "$wt_prefix" --path "$sm_path" --name "$sm_name" --url "$realrepo" "$reference" "$depth" || exit