Even with flag, summary would echo output. This patch conforms git-submodule to match user expectations. Signed-off-by: pbaker <pbaker@xxxxxxxxxxxxx> --- git-submodule.sh | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 7c2e060..784c6fa 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -187,7 +187,7 @@ cmd_add() then if test -d "$path"/.git -o -f "$path"/.git then - echo "Adding existing repo at '$path' to the index" + say "Adding existing repo at '$path' to the index" else die "'$path' already exists and is not a valid git repo" fi @@ -450,10 +450,10 @@ cmd_summary() { while read mod_src mod_dst sha1_src sha1_dst status name do # Always show modules deleted or type-changed (blob<->module) - test $status = D -o $status = T && echo "$name" && continue + test $status = D -o $status = T && say "$name" && continue # Also show added or modified modules which are checked out GIT_DIR="$name/.git" git-rev-parse --git-dir >/dev/null 2>&1 && - echo "$name" + say "$name" done ) @@ -522,25 +522,25 @@ cmd_summary() { total_commits=" ($(($total_commits + 0)))" ;; esac - + sha1_abbr_src=$(echo $sha1_src | cut -c1-7) sha1_abbr_dst=$(echo $sha1_dst | cut -c1-7) if test $status = T then if test $mod_dst = 160000 then - echo "* $name $sha1_abbr_src(blob)->$sha1_abbr_dst(submodule)$total_commits:" + say "* $name $sha1_abbr_src(blob)->$sha1_abbr_dst(submodule)$total_commits:" else - echo "* $name $sha1_abbr_src(submodule)->$sha1_abbr_dst(blob)$total_commits:" + say "* $name $sha1_abbr_src(submodule)->$sha1_abbr_dst(blob)$total_commits:" fi else - echo "* $name $sha1_abbr_src...$sha1_abbr_dst$total_commits:" + say "* $name $sha1_abbr_src...$sha1_abbr_dst$total_commits:" fi if test -n "$errmsg" then # Don't give error msg for modification whose dst is not submodule # i.e. deleted or changed to blob - test $mod_dst = 160000 && echo "$errmsg" + test $mod_dst = 160000 && echo >&2 "$errmsg" else if test $mod_src = 160000 -a $mod_dst = 160000 then -- 1.6.2.1.316.gedbc2 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html