summaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorBrandon Casey <drafnel@gmail.com>2010-08-13 20:47:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-13 21:21:22 (GMT)
commitd1c3b10f7ced34a607c50de8b5c271ce9cf764ea (patch)
tree968bbf671511513c6ed94309910b2e8fad62b899 /git-rebase--interactive.sh
parent2d6ca6ef55226185b6a093f7fac27f5fecd51fe6 (diff)
downloadgit-d1c3b10f7ced34a607c50de8b5c271ce9cf764ea.zip
git-d1c3b10f7ced34a607c50de8b5c271ce9cf764ea.tar.gz
git-d1c3b10f7ced34a607c50de8b5c271ce9cf764ea.tar.bz2
git-rebase--interactive.sh: use printf instead of echo to print commit message
Replace the echo statements that operate on $rest with printf's to restore what was lost from 938791cd. This avoids any mangling that XSI-conformant echo's may introduce. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-xgit-rebase--interactive.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 3b10513..e16dbe2 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -625,7 +625,7 @@ skip_unnecessary_picks () {
case "$fd,$command" in
3,pick|3,p)
# pick a commit whose parent is current $ONTO -> skip
- sha1=$(echo "$rest" | cut -d ' ' -f 1)
+ sha1=$(printf '%s' "$rest" | cut -d ' ' -f 1)
case "$(git rev-parse --verify --quiet "$sha1"^)" in
"$ONTO"*)
ONTO=$sha1
@@ -642,7 +642,7 @@ skip_unnecessary_picks () {
fd=1
;;
esac
- echo "$command${rest:+ }$rest" >&$fd
+ printf '%s\n' "$command${rest:+ }$rest" >&$fd
done <"$TODO" >"$TODO.new" 3>>"$DONE" &&
mv -f "$TODO".new "$TODO" &&
case "$(peek_next_command)" in