提交 a23bfaed 编写于 作者: J Jeff King 提交者: Junio C Hamano

More echo "$user_message" fixes.

Here are fixes to more uses of 'echo "$msg"' where $msg could contain
backslashed sequence.
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 816366e2
...@@ -18,7 +18,7 @@ stop_here () { ...@@ -18,7 +18,7 @@ stop_here () {
stop_here_user_resolve () { stop_here_user_resolve () {
if [ -n "$resolvemsg" ]; then if [ -n "$resolvemsg" ]; then
echo "$resolvemsg" printf '%s\n' "$resolvemsg"
stop_here $1 stop_here $1
fi fi
cmdline=$(basename $0) cmdline=$(basename $0)
...@@ -146,7 +146,7 @@ do ...@@ -146,7 +146,7 @@ do
git_apply_opt="$git_apply_opt $1"; shift ;; git_apply_opt="$git_apply_opt $1"; shift ;;
--resolvemsg=*) --resolvemsg=*)
resolvemsg=$(echo "$1" | sed -e "s/^--resolvemsg=//"); shift ;; resolvemsg=${1#--resolvemsg=}; shift ;;
--) --)
shift; break ;; shift; break ;;
......
...@@ -328,7 +328,7 @@ f,*) ...@@ -328,7 +328,7 @@ f,*)
then then
echo "Wonderful." echo "Wonderful."
result_commit=$( result_commit=$(
echo "$merge_msg" | printf '%s\n' "$merge_msg" |
git-commit-tree $result_tree -p HEAD -p "$1" git-commit-tree $result_tree -p HEAD -p "$1"
) || exit ) || exit
finish "$result_commit" "In-index merge" finish "$result_commit" "In-index merge"
...@@ -433,7 +433,7 @@ done ...@@ -433,7 +433,7 @@ done
if test '' != "$result_tree" if test '' != "$result_tree"
then then
parents=$(git-show-branch --independent "$head" "$@" | sed -e 's/^/-p /') parents=$(git-show-branch --independent "$head" "$@" | sed -e 's/^/-p /')
result_commit=$(echo "$merge_msg" | git-commit-tree $result_tree $parents) || exit result_commit=$(printf '%s\n' "$merge_msg" | git-commit-tree $result_tree $parents) || exit
finish "$result_commit" "Merge made by $wt_strategy." finish "$result_commit" "Merge made by $wt_strategy."
dropsave dropsave
exit 0 exit 0
...@@ -472,7 +472,7 @@ else ...@@ -472,7 +472,7 @@ else
do do
echo $remote echo $remote
done >"$GIT_DIR/MERGE_HEAD" done >"$GIT_DIR/MERGE_HEAD"
echo "$merge_msg" >"$GIT_DIR/MERGE_MSG" printf '%s\n' "$merge_msg" >"$GIT_DIR/MERGE_MSG"
fi fi
if test "$merge_was_ok" = t if test "$merge_was_ok" = t
......
...@@ -126,7 +126,7 @@ if [ "$annotate" ]; then ...@@ -126,7 +126,7 @@ if [ "$annotate" ]; then
echo "#" ) > "$GIT_DIR"/TAG_EDITMSG echo "#" ) > "$GIT_DIR"/TAG_EDITMSG
${VISUAL:-${EDITOR:-vi}} "$GIT_DIR"/TAG_EDITMSG || exit ${VISUAL:-${EDITOR:-vi}} "$GIT_DIR"/TAG_EDITMSG || exit
else else
echo "$message" >"$GIT_DIR"/TAG_EDITMSG printf '%s\n' "$message" >"$GIT_DIR"/TAG_EDITMSG
fi fi
grep -v '^#' <"$GIT_DIR"/TAG_EDITMSG | grep -v '^#' <"$GIT_DIR"/TAG_EDITMSG |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册