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

Incorrect handling of interactive rebases with root flag

From
FFFrank Paulo Filho <me@frankpf.com>
Date
May 3, 2017, 22:55 UTC
Message-ID
<1493852127.2480170.965025544.54B1448D@webmail.messagingengine.com>

If I run an interactive rebase on a branch without the --root flag, git does not modify (change the hash, etc.) any initial commits that are being "pick"ed in the same order. However, if I use --root, every single commit is modified.

Here's an example:
* Old (immediately after running "git rebase -i --root"):
    pick d89 root
    pick 3e7 bar
    pick 57e baz
* New (after editing the "git-rebase-todo" file):
    pick d89 root
    pick 57e baz
    pick 3e7 bar

After this, AFAIK, only baz and bar's hashes should change. However, the root commit's hash (d89) also changes.

A simpler way to reproduce this is to just run `git rebase -i --root` and rebase without changing anything. Every commit will be modified.

Is this supposed to happen?
Message 1 of 1 in “Incorrect handling of interactive rebases with root flag”
  1. Frank Paulo FilhoMay 3, 2017

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.