Skip to content

Commit 41f556b

Browse files
committed
rebase-i: style fix
Case arms should align with "case" and "esac". Do not cat a file into a pipeline; just make the downstream command read from the file. Having a while statement as a downstream of a pipe is fine, but the loop should begin on its own line. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 869d588 commit 41f556b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

git-rebase--interactive.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,10 @@ pick_one_preserving_merges () {
263263
then
264264
if test "$fast_forward" = t
265265
then
266-
cat "$DOTEST"/current-commit | while read current_commit
266+
while read current_commit
267267
do
268268
git rev-parse HEAD > "$REWRITTEN"/$current_commit
269-
done
269+
done <"$DOTEST"/current-commit
270270
rm "$DOTEST"/current-commit ||
271271
die "Cannot write current commit's replacement sha1"
272272
fi
@@ -440,9 +440,9 @@ record_in_rewritten() {
440440
echo "$oldsha1" >> "$REWRITTEN_PENDING"
441441

442442
case "$(peek_next_command)" in
443-
squash|s|fixup|f)
443+
squash|s|fixup|f)
444444
;;
445-
*)
445+
*)
446446
flush_rewritten_pending
447447
;;
448448
esac
@@ -890,7 +890,8 @@ first and then run 'git rebase --continue' again."
890890
git rev-list $MERGES_OPTION --pretty=oneline --abbrev-commit \
891891
--abbrev=7 --reverse --left-right --topo-order \
892892
$REVISIONS | \
893-
sed -n "s/^>//p" | while read shortsha1 rest
893+
sed -n "s/^>//p" |
894+
while read shortsha1 rest
894895
do
895896
if test t != "$PRESERVE_MERGES"
896897
then

0 commit comments

Comments
 (0)