From c547d62112e0fab32a9f859890432ba8235b89aa Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Wed, 27 Apr 2011 18:38:04 +0200 Subject: [PATCH] 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 --- git-submodule.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/git-submodule.sh b/git-submodule.sh index 64a70d621a..5d06d71cd1 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -836,12 +836,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 <