submodule: Use cat instead of echo to avoid DOS line-endings

In msysGit, echo used in scripts outputs DOS line-endings while built-ins
use Unix line-endings in their output. This causes t7508-status to fail
due to mixed line endings in the output of git status (which calls
git-submodule).

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
This commit is contained in:
Sebastian Schuberth 2011-04-27 18:38:04 +02:00 committed by Johannes Schindelin
parent 1b06ac473c
commit 39ad164d02

View file

@ -831,12 +831,16 @@ cmd_summary() {
done |
if test -n "$for_status"; then
if [ -n "$files" ]; then
gettextln "# Submodules changed but not updated:"
status_msg="$(gettextln "# Submodules changed but not updated:")"
else
gettextln "# Submodule changes to be committed:"
status_msg="$(gettextln "# Submodule changes to be committed:")"
fi
echo "#"
sed -e 's|^|# |' -e 's|^# $|#|'
status_sed=$(sed -e 's|^|# |' -e 's|^# $|#|')
cat <<EOF
$status_msg
#
$status_sed
EOF
else
cat
fi