Skip to content

Commit

Permalink
rebase--interactive: Ignore comments and blank lines in peek_next_com…
Browse files Browse the repository at this point in the history
…mand

Previously, blank lines and/or comments within a series of
squash/fixup commands would confuse "git rebase -i" into thinking that
the series was finished.  It would therefore require the user to edit
the commit message for the squash/fixup commits seen so far.  Then,
after continuing, it would ask the user to edit the commit message
again.

Ignore comments and blank lines within a group of squash/fixup
commands, allowing them to be processed in one go.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael Haggerty authored and Junio C Hamano committed Jan 12, 2010
1 parent 8fb5d44 commit 2b77029
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-rebase--interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ make_squash_message () {
}

peek_next_command () {
sed -n "1s/ .*$//p" < "$TODO"
sed -n -e "/^#/d" -e "/^$/d" -e "s/ .*//p" -e "q" < "$TODO"
}

do_next () {
Expand Down

0 comments on commit 2b77029

Please sign in to comment.