From 91dfb7b260af40a2041c527bb676a9209c2a917c 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 595811f319..a843d78d8c 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -900,12 +900,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 <