summaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-07-05 22:16:15 -0700
committerJunio C Hamano <gitster@pobox.com>2010-07-05 23:22:52 -0700
commit41f556b947ef5a161aaa791a865242d9bd8e5610 (patch)
treeba039b1c90b5f223ebb3394c6c96331cdf713430 /git-rebase--interactive.sh
parent869d58813b24c74e84c9388041eafcef40cb51e4 (diff)
downloadgit-41f556b947ef5a161aaa791a865242d9bd8e5610.tar.gz
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>
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-xgit-rebase--interactive.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 6b86abc64b..ed57552b7e 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -263,10 +263,10 @@ pick_one_preserving_merges () {
then
if test "$fast_forward" = t
then
- cat "$DOTEST"/current-commit | while read current_commit
+ while read current_commit
do
git rev-parse HEAD > "$REWRITTEN"/$current_commit
- done
+ done <"$DOTEST"/current-commit
rm "$DOTEST"/current-commit ||
die "Cannot write current commit's replacement sha1"
fi
@@ -440,9 +440,9 @@ record_in_rewritten() {
echo "$oldsha1" >> "$REWRITTEN_PENDING"
case "$(peek_next_command)" in
- squash|s|fixup|f)
+ squash|s|fixup|f)
;;
- *)
+ *)
flush_rewritten_pending
;;
esac
@@ -890,7 +890,8 @@ first and then run 'git rebase --continue' again."
git rev-list $MERGES_OPTION --pretty=oneline --abbrev-commit \
--abbrev=7 --reverse --left-right --topo-order \
$REVISIONS | \
- sed -n "s/^>//p" | while read shortsha1 rest
+ sed -n "s/^>//p" |
+ while read shortsha1 rest
do
if test t != "$PRESERVE_MERGES"
then