Skip to content

Commit

Permalink
git-rebase--interactive.sh: use printf instead of echo to print commi…
Browse files Browse the repository at this point in the history
…t message

Replace the echo statements that operate on $rest with printf's to restore
what was lost from 938791c.  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>
  • Loading branch information
Brandon Casey authored and Junio C Hamano committed Aug 13, 2010
1 parent 2d6ca6e commit d1c3b10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-rebase--interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit d1c3b10

Please sign in to comment.