Skip to content

Commit 7cbb613

Browse files
committed
Merge branch 'some-CR-fixes'
This branch contains some hacks so that Git produces less CR, and then some tests. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents b26495b + f36f773 commit 7cbb613

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

git-am.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,9 @@ It does not apply to blobs recorded in its index.")"
185185
}
186186

187187
clean_abort () {
188-
test $# = 0 || echo >&2 "$@"
188+
test $# = 0 || cat >&2 <<EOF
189+
$@
190+
EOF
189191
rm -fr "$dotest"
190192
exit 1
191193
}

git-merge-octopus.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ do
7171

7272
case "$LF$common$LF" in
7373
*"$LF$SHA1$LF"*)
74-
echo "Already up-to-date with $pretty_name"
74+
cat << EOF
75+
Already up-to-date with $pretty_name
76+
EOF
7577
continue
7678
;;
7779
esac
@@ -83,15 +85,19 @@ do
8385
# tree as the intermediate result of the merge.
8486
# We still need to count this as part of the parent set.
8587

86-
echo "Fast-forwarding to: $pretty_name"
88+
cat << EOF
89+
Fast-forwarding to: $pretty_name
90+
EOF
8791
git read-tree -u -m $head $SHA1 || exit
8892
MRC=$SHA1 MRT=$(git write-tree)
8993
continue
9094
fi
9195

9296
NON_FF_MERGE=1
9397

94-
echo "Trying simple merge with $pretty_name"
98+
cat << EOF
99+
Trying simple merge with $pretty_name
100+
EOF
95101
git read-tree -u -m --aggressive $common $MRT $SHA1 || exit 2
96102
next=$(git write-tree 2>/dev/null)
97103
if test $? -ne 0

git-sh-setup.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ GIT_QUIET=
5959
say () {
6060
if test -z "$GIT_QUIET"
6161
then
62-
printf '%s\n' "$*"
62+
cat <<EOF
63+
$*
64+
EOF
6365
fi
6466
}
6567

git-submodule.sh

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

435435
if test -z "$force" && ! git add --dry-run --ignore-missing "$sm_path" > /dev/null 2>&1
436436
then
437-
eval_gettextln "The following path is ignored by one of your .gitignore files:
438-
\$sm_path
439-
Use -f if you really want to add it." >&2
437+
cat >&2 <<EOF
438+
The following path is ignored by one of your .gitignore files:
439+
$(eval_gettextln $sm_path)
440+
Use -f if you really want to add it.
441+
EOF
440442
exit 1
441443
fi
442444

0 commit comments

Comments
 (0)