Skip to content

Commit f33946d

Browse files
committed
submodule: Fix t7400, t7405, t7406 for msysGit
Again, avoid using echo (which issues DOS line endings on msysGit) to not mix with Unix line-endings issued by git built-ins, even if this is at the cost of calling an external executable (cat) instead of a shell built-in (echo).
1 parent 599f505 commit f33946d

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

git-sh-setup.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ GIT_QUIET=
4949
say () {
5050
if test -z "$GIT_QUIET"
5151
then
52-
printf '%s\n' "$*"
52+
cat <<EOF
53+
$*
54+
EOF
5355
fi
5456
}
5557

git-submodule.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,11 @@ cmd_add()
222222

223223
if test -z "$force" && ! git add --dry-run --ignore-missing "$path" > /dev/null 2>&1
224224
then
225-
echo >&2 "The following path is ignored by one of your .gitignore files:" &&
226-
echo >&2 $path &&
227-
echo >&2 "Use -f if you really want to add it."
225+
cat >&2 <<EOF
226+
The following path is ignored by one of your .gitignore files:
227+
$path
228+
Use -f if you really want to add it.
229+
EOF
228230
exit 1
229231
fi
230232

0 commit comments

Comments
 (0)