Skip to content

Commit 8c6b549

Browse files
stefanbellergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a028a19 commit 8c6b549

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

git-submodule.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ cmd_update()
693693

694694
if test "$update_module" = "none"
695695
then
696-
echo "Skipping submodule '$displaypath'"
696+
echo >&2 "Skipping submodule '$displaypath'"
697697
continue
698698
fi
699699

@@ -702,7 +702,7 @@ cmd_update()
702702
# Only mention uninitialized submodules when its
703703
# path have been specified
704704
test "$#" != "0" &&
705-
say "$(eval_gettext "Submodule path '\$displaypath' not initialized
705+
say >&2 "$(eval_gettext "Submodule path '\$displaypath' not initialized
706706
Maybe you want to use 'update --init'?")"
707707
continue
708708
fi

t/t7400-submodule-basic.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ test_expect_success 'update --init' '
462462
git config --remove-section submodule.example &&
463463
test_must_fail git config submodule.example.url &&
464464
465-
git submodule update init > update.out &&
465+
git submodule update init 2> update.out &&
466466
cat update.out &&
467467
test_i18ngrep "not initialized" update.out &&
468468
test_must_fail git rev-parse --resolve-git-dir init/.git &&
@@ -480,7 +480,7 @@ test_expect_success 'update --init from subdirectory' '
480480
mkdir -p sub &&
481481
(
482482
cd sub &&
483-
git submodule update ../init >update.out &&
483+
git submodule update ../init 2>update.out &&
484484
cat update.out &&
485485
test_i18ngrep "not initialized" update.out &&
486486
test_must_fail git rev-parse --resolve-git-dir ../init/.git &&

0 commit comments

Comments
 (0)