Skip to content

Commit 2b3f61d

Browse files
committed
Merge branch 'jk/rebase-i-squash-count-fix' into maint
"git rebase -i" with a recent update started showing an incorrect count when squashing more than 10 commits. * jk/rebase-i-squash-count-fix: rebase--interactive: count squash commits above 10 correctly
2 parents 5fbb42a + 356b8ec commit 2b3f61d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-rebase--interactive.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ update_squash_messages () {
425425
if test -f "$squash_msg"; then
426426
mv "$squash_msg" "$squash_msg".bak || exit
427427
count=$(($(sed -n \
428-
-e "1s/^$comment_char.*\([0-9][0-9]*\).*/\1/p" \
428+
-e "1s/^$comment_char[^0-9]*\([0-9][0-9]*\).*/\1/p" \
429429
-e "q" < "$squash_msg".bak)+1))
430430
{
431431
printf '%s\n' "$comment_char $(eval_ngettext \

0 commit comments

Comments
 (0)