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 <gitster@pobox.com>
Junio C Hamano committed
Jul 5, 2010 at 22:16 UTC
41f556b947ef5a161aaa791a865242d9bd8e5610
1 file changed
+6
-5
git-rebase--interactive.sh
+6
-5
@@ -263,10 +263,10 @@ pick_one_preserving_merges () {
263
then
264
if test "$fast_forward" = t
265
then
266
- cat "$DOTEST"/current-commit | while read current_commit
266
+ while read current_commit
267
do
268
git rev-parse HEAD > "$REWRITTEN"/$current_commit
269
- done
269
+ done <"$DOTEST"/current-commit
270
rm "$DOTEST"/current-commit ||
271
die "Cannot write current commit's replacement sha1"
272
fi
@@ -440,9 +440,9 @@ record_in_rewritten() {
440
echo "$oldsha1" >> "$REWRITTEN_PENDING"
441
442
case "$(peek_next_command)" in
443
- squash|s|fixup|f)
443
+ squash|s|fixup|f)
444
;;
445
- *)
445
+ *)
446
flush_rewritten_pending
447
;;
448
esac
@@ -890,7 +890,8 @@ first and then run 'git rebase --continue' again."
890
git rev-list $MERGES_OPTION --pretty=oneline --abbrev-commit \
891
--abbrev=7 --reverse --left-right --topo-order \
892
$REVISIONS | \
893
- sed -n "s/^>//p" | while read shortsha1 rest
893
+ sed -n "s/^>//p" |
894
+ while read shortsha1 rest
895
do
896
if test t != "$PRESERVE_MERGES"
897
then