summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 816366e)
raw | patch | inline | side by side (parent: 816366e)
author | Jeff King <peff@peff.net> | |
Sat, 26 May 2007 07:33:03 +0000 (00:33 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 26 May 2007 07:33:03 +0000 (00:33 -0700) |
Here are fixes to more uses of 'echo "$msg"' where $msg could contain
backslashed sequence.
Signed-off-by: Junio C Hamano <junkio@cox.net>
backslashed sequence.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-am.sh | patch | blob | history | |
git-merge.sh | patch | blob | history | |
git-tag.sh | patch | blob | history |
diff --git a/git-am.sh b/git-am.sh
index 543efd0ad3512d09081432c4590af7575f93dd1f..8b5712968ebcfe3f8fb5426e5104de2e7d2d3334 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
stop_here_user_resolve () {
if [ -n "$resolvemsg" ]; then
- echo "$resolvemsg"
+ printf '%s\n' "$resolvemsg"
stop_here $1
fi
cmdline=$(basename $0)
git_apply_opt="$git_apply_opt $1"; shift ;;
--resolvemsg=*)
- resolvemsg=$(echo "$1" | sed -e "s/^--resolvemsg=//"); shift ;;
+ resolvemsg=${1#--resolvemsg=}; shift ;;
--)
shift; break ;;
diff --git a/git-merge.sh b/git-merge.sh
index fa4589173f426d6172883c47479c52b8700cafa8..bf1fd4f06b42ca7c07d7a64fba7921c48d6fd72f 100755 (executable)
--- a/git-merge.sh
+++ b/git-merge.sh
then
echo "Wonderful."
result_commit=$(
- echo "$merge_msg" |
+ printf '%s\n' "$merge_msg" |
git-commit-tree $result_tree -p HEAD -p "$1"
) || exit
finish "$result_commit" "In-index merge"
if test '' != "$result_tree"
then
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."
dropsave
exit 0
do
echo $remote
done >"$GIT_DIR/MERGE_HEAD"
- echo "$merge_msg" >"$GIT_DIR/MERGE_MSG"
+ printf '%s\n' "$merge_msg" >"$GIT_DIR/MERGE_MSG"
fi
if test "$merge_was_ok" = t
diff --git a/git-tag.sh b/git-tag.sh
index 4a0a7b660780b7c377ce80ac49dc99cea3e8137d..6f0b7a72192bbeb7ca4693f40f80e2bd20d5eb03 100755 (executable)
--- a/git-tag.sh
+++ b/git-tag.sh
echo "#" ) > "$GIT_DIR"/TAG_EDITMSG
${VISUAL:-${EDITOR:-vi}} "$GIT_DIR"/TAG_EDITMSG || exit
else
- echo "$message" >"$GIT_DIR"/TAG_EDITMSG
+ printf '%s\n' "$message" >"$GIT_DIR"/TAG_EDITMSG
fi
grep -v '^#' <"$GIT_DIR"/TAG_EDITMSG |