@@ -263,10 +263,10 @@ pick_one_preserving_merges () {
263
263
then
264
264
if test " $fast_forward " = t
265
265
then
266
- cat " $DOTEST " /current-commit | while read current_commit
266
+ while read current_commit
267
267
do
268
268
git rev-parse HEAD > " $REWRITTEN " /$current_commit
269
- done
269
+ done < " $DOTEST " /current-commit
270
270
rm " $DOTEST " /current-commit ||
271
271
die " Cannot write current commit's replacement sha1"
272
272
fi
@@ -440,17 +440,17 @@ record_in_rewritten() {
440
440
echo " $oldsha1 " >> " $REWRITTEN_PENDING "
441
441
442
442
case " $( peek_next_command) " in
443
- squash|s|fixup|f)
443
+ squash|s|fixup|f)
444
444
;;
445
- * )
445
+ * )
446
446
flush_rewritten_pending
447
447
;;
448
448
esac
449
449
}
450
450
451
451
do_next () {
452
452
rm -f " $MSG " " $AUTHOR_SCRIPT " " $AMEND " || exit
453
- read command sha1 rest < " $TODO "
453
+ read -r command sha1 rest < " $TODO "
454
454
case " $command " in
455
455
' #' * |' ' |noop)
456
456
mark_action_done
@@ -591,7 +591,7 @@ do_rest () {
591
591
# skip picking commits whose parents are unchanged
592
592
skip_unnecessary_picks () {
593
593
fd=3
594
- while read command sha1 rest
594
+ while read -r command sha1 rest
595
595
do
596
596
# fd=3 means we skip the command
597
597
case " $fd ,$command ,$( git rev-parse --verify --quiet $sha1 ^) " in
@@ -644,13 +644,13 @@ rearrange_squash () {
644
644
test -s " $1 .sq" || return
645
645
646
646
used=
647
- while read pick sha1 message
647
+ while read -r pick sha1 message
648
648
do
649
649
case " $used " in
650
650
* " $sha1 " * ) continue ;;
651
651
esac
652
652
echo " $pick $sha1 $message "
653
- while read squash action msg
653
+ while read -r squash action msg
654
654
do
655
655
case " $message " in
656
656
" $msg " * )
@@ -890,7 +890,8 @@ first and then run 'git rebase --continue' again."
890
890
git rev-list $MERGES_OPTION --pretty=oneline --abbrev-commit \
891
891
--abbrev=7 --reverse --left-right --topo-order \
892
892
$REVISIONS | \
893
- sed -n " s/^>//p" | while read shortsha1 rest
893
+ sed -n " s/^>//p" |
894
+ while read -r shortsha1 rest
894
895
do
895
896
if test t ! = " $PRESERVE_MERGES "
896
897
then
0 commit comments