submodule update: direct error message to stderr

Reroute the error message for specified but initialized submodules to stderr instead of stdout. Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stefan Beller committed Feb 29, 2016 at 18:07 UTC 8c6b5491182510f2344dae71784fcb5c3992d005
2 files changed +4 -4
git-submodule.sh
+2 -2
@@ -693,7 +693,7 @@ cmd_update()
693
694 if test "$update_module" = "none"
695 then
696 - echo "Skipping submodule '$displaypath'"
696 + echo >&2 "Skipping submodule '$displaypath'"
697 continue
698 fi
699
@@ -702,7 +702,7 @@ cmd_update()
702 # Only mention uninitialized submodules when its
703 # path have been specified
704 test "$#" != "0" &&
705 - say "$(eval_gettext "Submodule path '\$displaypath' not initialized
705 + say >&2 "$(eval_gettext "Submodule path '\$displaypath' not initialized
706 Maybe you want to use 'update --init'?")"
707 continue
708 fi
t/t7400-submodule-basic.sh
+2 -2
@@ -462,7 +462,7 @@ test_expect_success 'update --init' '
462 git config --remove-section submodule.example &&
463 test_must_fail git config submodule.example.url &&
464
465 - git submodule update init > update.out &&
465 + git submodule update init 2> update.out &&
466 cat update.out &&
467 test_i18ngrep "not initialized" update.out &&
468 test_must_fail git rev-parse --resolve-git-dir init/.git &&
@@ -480,7 +480,7 @@ test_expect_success 'update --init from subdirectory' '
480 mkdir -p sub &&
481 (
482 cd sub &&
483 - git submodule update ../init >update.out &&
483 + git submodule update ../init 2>update.out &&
484 cat update.out &&
485 test_i18ngrep "not initialized" update.out &&
486 test_must_fail git rev-parse --resolve-git-dir ../init/.git &&