summaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2010-01-12 15:38:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-01-12 20:34:50 (GMT)
commit234b3dae2fe83ae7df2c82194cd5f5eb01fd166d (patch)
tree95467cc9c2adfe8007a43376fdc191e4fcb6ac53 /git-rebase--interactive.sh
parent05c95dbe44b42f9c3f7efe6793d311a26e1b8181 (diff)
downloadgit-234b3dae2fe83ae7df2c82194cd5f5eb01fd166d.zip
git-234b3dae2fe83ae7df2c82194cd5f5eb01fd166d.tar.gz
git-234b3dae2fe83ae7df2c82194cd5f5eb01fd166d.tar.bz2
rebase-i: 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>
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-xgit-rebase--interactive.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 30de96e..55c451a 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -338,7 +338,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 () {