diff options
author | Stefan Beller <sbeller@google.com> | 2016-02-25 15:48:32 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-02-25 15:59:26 -0800 |
commit | 64f2cc0a4f446370b7f9f17927e3e15715d535cc (patch) | |
tree | f8f779c3fa8d61708bf02d3cf95a1ed631d99fc7 | |
parent | 7657dd8bef2902f4d765c4f710d13128fbab2a65 (diff) | |
download | git-64f2cc0a4f446370b7f9f17927e3e15715d535cc.tar.gz |
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>
-rwxr-xr-x | git-submodule.sh | 4 | ||||
-rwxr-xr-x | t/t7400-submodule-basic.sh | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/git-submodule.sh b/git-submodule.sh index 9bc5c5f94d..9ee86d4f5b 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -693,7 +693,7 @@ cmd_update() if test "$update_module" = "none" then - echo "Skipping submodule '$displaypath'" + echo >&2 "Skipping submodule '$displaypath'" continue fi @@ -702,7 +702,7 @@ cmd_update() # Only mention uninitialized submodules when its # path have been specified test "$#" != "0" && - say "$(eval_gettext "Submodule path '\$displaypath' not initialized + say >&2 "$(eval_gettext "Submodule path '\$displaypath' not initialized Maybe you want to use 'update --init'?")" continue fi diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index 540771ca41..5991e3c015 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -462,7 +462,7 @@ test_expect_success 'update --init' ' git config --remove-section submodule.example && test_must_fail git config submodule.example.url && - git submodule update init > update.out && + git submodule update init 2> update.out && cat update.out && test_i18ngrep "not initialized" update.out && test_must_fail git rev-parse --resolve-git-dir init/.git && @@ -480,7 +480,7 @@ test_expect_success 'update --init from subdirectory' ' mkdir -p sub && ( cd sub && - git submodule update ../init >update.out && + git submodule update ../init 2>update.out && cat update.out && test_i18ngrep "not initialized" update.out && test_must_fail git rev-parse --resolve-git-dir ../init/.git && |