rebase--interactive: Ignore comments and blank lines in peek_next_command
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>
Michael Haggerty committed
Jan 11, 2010 at 16:56 UTC
2b77029f4ad556b82cdbadf59ae13d41e23b6e7c
1 file changed
+1
-1
git-rebase--interactive.sh
+1
-1
@@ -322,7 +322,7 @@ make_squash_message () {
322
}
323
324
peek_next_command () {
325
- sed -n "1s/ .*$//p" < "$TODO"
325
+ sed -n -e "/^#/d" -e "/^$/d" -e "s/ .*//p" -e "q" < "$TODO"
326
}
327
328
do_next () {