Skip to content

Commit d1c3b10

Browse files
drafnelgitster
authored andcommitted
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 938791c. This avoids any mangling that XSI-conformant echo's may introduce. Signed-off-by: Brandon Casey <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2d6ca6e commit d1c3b10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-rebase--interactive.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ skip_unnecessary_picks () {
625625
case "$fd,$command" in
626626
3,pick|3,p)
627627
# 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)
629629
case "$(git rev-parse --verify --quiet "$sha1"^)" in
630630
"$ONTO"*)
631631
ONTO=$sha1
@@ -642,7 +642,7 @@ skip_unnecessary_picks () {
642642
fd=1
643643
;;
644644
esac
645-
echo "$command${rest:+ }$rest" >&$fd
645+
printf '%s\n' "$command${rest:+ }$rest" >&$fd
646646
done <"$TODO" >"$TODO.new" 3>>"$DONE" &&
647647
mv -f "$TODO".new "$TODO" &&
648648
case "$(peek_next_command)" in

0 commit comments

Comments
 (0)