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

Nonexistent changes appear rebasing but only with rebase.backend=apply

From
MGMarco Giuliano <marco.giuliano@tesisquare.com>
Date
Jun 18, 2021, 15:21 UTC
Message-ID
<CANLwWg4hG=iv9qjOmGHSJ7z7Y+vvvP+x0o3DfR5bH5A-C6_7aQ@mail.gmail.com>
Hi All

I'm facing a strange anomaly during rebase. I'll try to explain what happens because unfortunately I cannot share more information since it's confidential and unfortunately an anonymized export does not reproduce the issue.

I have the following repository status:
   * commit 2 (BRANCH X)
   |
   |  * commit 4 (BRANCH Y) (HEAD)
   |  |
   |  * commit 3
   | /
   |/
   * commit 1
   |
   |
 (...)

What I'm trying to do is rebasing branch Y on branch X, with the command: git rebase X

The anomaly is that, among other expected conflicts, also two files (fileA, fileB) appear modified in both branches, but those two files have not been modified in any of the 4 commits you see in the graph above! The anomaly appears only with the config setting rebase.backend=apply, while not with rebase.backend=merge (*).

This might not be caused by rebase command itself, but rather by some previous operations which might have accidentally "broken" something and that the rebase simply makes them appear. You need to know that commit 4 is the result of several squash and reordering of multiple commits; is it possible that some of those operations have created some "leftovers" ?

I know this is difficult without seeing the actual repository, but could you just give me some advice or point me to the place where I can investigate ?

(*) When the anomaly first appeared, I was using git for windows, version < 2.26.0 (unfortunately I cannot recover the exact number); I decided to upgrade git to 2.31.1 and the anomaly disappeared. Investigating the release notes, I noticed that rebase.backend default value changed from apply to rebase from version 2.26.0. I also copied the repository on linux (with git 2.31.0), and the behavior is the same.

Thanks in advance for any help, Best Regards, Marco

Next: Felipe Contreras
Message 1 of 9 in “Nonexistent changes appear rebasing but only with rebase.backend=apply”
  1. Marco GiulianoJun 18, 2021
  2. Felipe ContrerasJun 18, 2021
  3. Phillip WoodJun 20, 2021
  4. Marco GiulianoJun 24, 2021
  5. Phillip WoodJun 24, 2021
  6. Marco GiulianoJun 25, 2021
  7. Elijah NewrenJun 26, 2021
  8. Marco GiulianoJun 29, 2021
  9. Felipe ContrerasJun 25, 2021

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.