git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/1] Fix git rebase --stat -i <unrelated-history>

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Nov 27, 2018, 11:13 UTC
Message-ID
<pull.88.git.gitgitgadget@gmail.com>
We're really entering obscure territory here, I would say.

To trigger the bug, two things have to come together: the user must have asked for a diffstat afterwards, and the commits need to have been rebased onto a completely unrelated commit history (i.e. there must exist no merge base between the pre-rebase HEAD and the post-rebase HEAD).

Please note that this bug existed already in the scripted rebase, but it was never detected because the scripted version would not even perform any error checking.

It will make Junio very happy that I squashed the regression test in to the patch that fixes it. The reason, however, was not to make Junio happy (I hope to make him happy by fixing bugs), but simply that an earlier iteration of test would only fail with the built-in rebase, but not with the scripted version. The current version would fail with the scripted version, but I'll save the time to split the patch again now.

Johannes Schindelin (1):
  rebase --stat: fix when rebasing to an unrelated history
 builtin/rebase.c          |  8 +++++---
 git-legacy-rebase.sh      |  6 ++++--
 t/t3406-rebase-message.sh | 10 ++++++++++
 3 files changed, 19 insertions(+), 5 deletions(-)
base-commit: a1598010f775d82b5adf12c29d0f5bc9b41434c6
Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-88%2Fdscho%2Frebase-stat-fix-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-88/dscho/rebase-stat-fix-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/88
-- 
gitgitgadget
Next: Johannes Schindelin via GitGitGadget
Message 1 of 7 in “Fix git rebase --stat -i <unrelated-history>”
  1. 0/1 Fix git rebase --stat -i <unrelated-history>Johannes Schindelin via GitGitGadget, Nov 27, 2018
  2. 1/1 rebase --stat: fix when rebasing to an unrelated historyJohannes Schindelin via GitGitGadget, Nov 27, 2018
  3. Junio C HamanoNov 29, 2018
  4. Johannes SchindelinNov 29, 2018
  5. Junio C HamanoNov 30, 2018
  6. 0/1 Fix git rebase --stat -i <unrelated-history>Johannes Schindelin via GitGitGadget, Nov 29, 2018
  7. 1/1 rebase --stat: fix when rebasing to an unrelated historyJohannes Schindelin via GitGitGadget, Nov 29, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.