Git development
 help / color / mirror / Atom feed
* Squashing commits with git rebase -i may miscount commits in commit message
@ 2017-01-06  9:04 Brandon Tolsch
  2017-01-06 13:46 ` Johannes Schindelin
  2017-01-07  8:23 ` [PATCH] rebase--interactive: count squash commits above 10 correctly Jeff King
  0 siblings, 2 replies; 6+ messages in thread
From: Brandon Tolsch @ 2017-01-06  9:04 UTC (permalink / raw)
  To: git

git --version: 2.11.0

When using git rebase -i to squash a series of commits that includes
more than 10 commits, the generated commit message you are given to
edit counts the old messages incorrectly.  It will say the total
number of commits is (actual % 10) (if they were 0-based) and it will
also count the commits as (actual % 10).

For example, 15, 25, 35, etc. commits:
# This is a combination of 5 commits.
# This is the 1st commit message:
msg

# This is the commit message #2:
...
...
# This is commit message #10:
msg

# This is commit message #1:
...

# This is commit message #5:
msg

While not a big issue, it did make me double check what I was doing
when I saw "a combination of 10 commits" instead of 20 in the commit
message.

-Brandon Tolsch

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-08  3:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-06  9:04 Squashing commits with git rebase -i may miscount commits in commit message Brandon Tolsch
2017-01-06 13:46 ` Johannes Schindelin
2017-01-07  8:23 ` [PATCH] rebase--interactive: count squash commits above 10 correctly Jeff King
2017-01-07 10:51   ` Johannes Schindelin
2017-01-07 11:05     ` Jeff King
2017-01-08  3:26   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox