@matheusbsbs / matheus-bagliano / commits / d1c3b10f7c
Fork 0

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>

Brandon Casey committed Aug 13, 2010 at 15:47 UTC d1c3b10f7ced34a607c50de8b5c271ce9cf764ea
1 file changed +2 -2
git-rebase--interactive.sh
+2 -2
@@ -625,7 +625,7 @@ skip_unnecessary_picks () {
625 case "$fd,$command" in
626 3,pick|3,p)
627 # pick a commit whose parent is current $ONTO -> skip
628 - sha1=$(echo "$rest" | cut -d ' ' -f 1)
628 + sha1=$(printf '%s' "$rest" | cut -d ' ' -f 1)
629 case "$(git rev-parse --verify --quiet "$sha1"^)" in
630 "$ONTO"*)
631 ONTO=$sha1
@@ -642,7 +642,7 @@ skip_unnecessary_picks () {
642 fd=1
643 ;;
644 esac
645 - echo "$command${rest:+ }$rest" >&$fd
645 + printf '%s\n' "$command${rest:+ }$rest" >&$fd
646 done <"$TODO" >"$TODO.new" 3>>"$DONE" &&
647 mv -f "$TODO".new "$TODO" &&
648 case "$(peek_next_command)" in