summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-01-31 13:32:07 -0800
committerJunio C Hamano <gitster@pobox.com>2017-01-31 13:32:07 -0800
commit2b3f61dc8b5ee4ee5b1c1ad8bdeebce52244a3a6 (patch)
tree50c13aa2a6b151ebeca032f1303d5e5c7f03d352
parent5fbb42a21ec6169328e081f7b475e4b56152c5b5 (diff)
parent356b8ecff101e3f763619d74f344ede3204c7991 (diff)
downloadgit-2b3f61dc8b5ee4ee5b1c1ad8bdeebce52244a3a6.tar.gz
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
-rw-r--r--git-rebase--interactive.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 41fd374c72..f5f58c483a 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -425,7 +425,7 @@ update_squash_messages () {
if test -f "$squash_msg"; then
mv "$squash_msg" "$squash_msg".bak || exit
count=$(($(sed -n \
- -e "1s/^$comment_char.*\([0-9][0-9]*\).*/\1/p" \
+ -e "1s/^$comment_char[^0-9]*\([0-9][0-9]*\).*/\1/p" \
-e "q" < "$squash_msg".bak)+1))
{
printf '%s\n' "$comment_char $(eval_ngettext \