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

[BUG] log --follow ignore files renamed in a merge commit

From
TDThibault Delor <delor.thibault@gmail.com>
Date
Mar 31, 2020, 05:28 UTC
Message-ID
<CAM+dguao5CtTUp1Fxc+BXnhYzTqU_0oWrsaK0RiwUcM10iq3hg@mail.gmail.com>
Hello there,

I have raised my initial issue on Stack Overflow: https://stackoverflow.com/questions/60927159/merging-repo-with-git-subtree-prefix-break-the-history

After reading the code, it's definitely a bug with git log. The actual issue is that if a file has been renamed inside a commit with 2+ parents `git log --follow` won't show it and loose track of the file. On the other side, running `git log -m --follow ...` is working as expected.

I would be really keen to submit a patch in the next couple of days.

I am planning to tweak the method `log_tree_diff` in log_tree.c as I feel that's where the error coming from. I am guess I will have to force somehow the evaluation of the diff (even if the diff isn't displayed) so the method `try_to_follow_renames` gets a chance to be evaluated.

I have never contributed to git source code, I'll the doc "SubmittingPatches" but feel free to give any guidance.

Thanks Tibo

Message 1 of 1 in “[BUG] log --follow ignore files renamed in a merge commit”
  1. Thibault DelorMar 31, 2020

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.