diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-08-20 19:41:33 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-20 19:41:33 (GMT) |
commit | 36fd1e843b83a1ee10178e7da19eee3dee590580 (patch) | |
tree | 1506cc5f569415dae4d436f6f32c34bb604e6b5b /sequencer.c | |
parent | 2a2c18f1c3ae3fbade32df11719f24e8d6a6709c (diff) | |
parent | dd2e36ebaccd6dc2ca4d37759248ce9bbdf9113e (diff) | |
download | git-36fd1e843b83a1ee10178e7da19eee3dee590580.zip git-36fd1e843b83a1ee10178e7da19eee3dee590580.tar.gz git-36fd1e843b83a1ee10178e7da19eee3dee590580.tar.bz2 |
Merge branch 'pw/rebase-i-squash-number-fix'
When "git rebase -i" is told to squash two or more commits into
one, it labeled the log message for each commit with its number.
It correctly called the first one "1st commit", but the next one
was "commit #1", which was off-by-one. This has been corrected.
* pw/rebase-i-squash-number-fix:
rebase -i: fix numbering in squash message
Diffstat (limited to 'sequencer.c')
-rw-r--r-- | sequencer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sequencer.c b/sequencer.c index c00eedd..2db52fe 100644 --- a/sequencer.c +++ b/sequencer.c @@ -1552,13 +1552,13 @@ static int update_squash_messages(enum todo_command command, unlink(rebase_path_fixup_msg()); strbuf_addf(&buf, "\n%c ", comment_line_char); strbuf_addf(&buf, _("This is the commit message #%d:"), - ++opts->current_fixup_count); + ++opts->current_fixup_count + 1); strbuf_addstr(&buf, "\n\n"); strbuf_addstr(&buf, body); } else if (command == TODO_FIXUP) { strbuf_addf(&buf, "\n%c ", comment_line_char); strbuf_addf(&buf, _("The commit message #%d will be skipped:"), - ++opts->current_fixup_count); + ++opts->current_fixup_count + 1); strbuf_addstr(&buf, "\n\n"); strbuf_add_commented_lines(&buf, body, strlen(body)); } else |