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

Re: Trouble merging renamed but identical files - CONFLICT (rename/rename)

From
Phil Hord <phil.hord@gmail.com>
Date
Jun 29, 2014, 20:09 UTC
Message-ID
<CABURp0qZVMGMQ8X4P0P1OGF9gNqu__=Uk+Lr7GyBbscm5wL1=w@mail.gmail.com>
In-Reply-To
<CABURp0okCDbwLOL3Osj2WtfQ_Qj3v=1FrAV28gJjPy1yzQU7Vg@mail.gmail.com>
On Sun, Jun 29, 2014 at 11:31 AM, Phil Hord <phil.hord@gmail.com> wrote:
> On Fri, Jun 27, 2014 at 8:42 PM, Jason Pyeron <jpyeron@pdinc.us> wrote:
>> Sorry for the http://pastebin.com/1R68v6jt (changes the merge to
>> 1ca13ed2271d60ba93d40bcc8db17ced8545f172, and manually reconciles the merge),
>> but it was too long to be readable in the email.
Ok, I think I understand the issue you are trying to solve now.

Git (rather famously[1]) does not record renames or copies. It is expected instead that renames and copies will be detected when it is important after the fact. This allows us to ignore rename detection and resolution when creating project history; in the future, better rename/copy detection will "just work" on existing repositories and the repos themselves will not need to be adjusted.

What you are encountering now seems to be a shortcoming of Git's current rename/copy detection. But you are trying to overcome today's shortcoming by adjusting your project history to accommodate it. Instead you should just do the merge like you normally would without regard to how 'git blame' shows the result.

Maybe there is a bug here still, but it is probably in git-blame.
[1] https://git.wiki.kernel.org/index.php/GitFaq#Why_does_Git_not_.22track.22_renames.3F
Previous: Phil HordNext: Jason Pyeron
Message 8 of 12 in “Trouble merging renamed but identical files - CONFLICT (rename/rename)”
  1. Jason PyeronJun 27, 2014
  2. Phil HordJun 27, 2014
  3. Jason PyeronJun 27, 2014
  4. Phil HordJun 29, 2014
  5. Jason PyeronJun 28, 2014
  6. Jason PyeronJun 28, 2014
  7. Phil HordJun 29, 2014
  8. Phil HordJun 29, 2014
  9. Jason PyeronJun 29, 2014
  10. Phil HordJun 29, 2014
  11. Jason PyeronJun 29, 2014
  12. Phil HordJun 30, 2014

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.