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

Re: corner case with rename tracking and reverts

From
Jeff King <peff@peff.net>
Date
Jul 2, 2012, 21:07 UTC
Message-ID
<20120702210733.GA5268@sigill.intra.peff.net>
In-Reply-To
<20120702124754.GA25882@localhost.localdomain>
On Mon, Jul 02, 2012 at 02:47:54PM +0200, Torben Hohn wrote:
Show 5 quoted lines
> i just came over some issue, where the rename tracking got confused.
> 
> I wanted to revert a commit to a moved file. But because it touched an
> empty file, this seems to have confused the rename tracking.
> (there were a few empty files there)

Yeah, it happens. When there are multiple identical sources (which happens often with empty files), we try to disambiguate using some heuristics on the filename, but they are not always correct.

As of v1.7.11, git will explicitly avoid auto-merging across renames of empty files. Instead, you'll get a modify/delete conflict and be given the opportunity to sort it out yourself.

-Peff
Previous: Torben Hohn
Message 2 of 2 in “corner case with rename tracking and reverts”
  1. Torben HohnJul 2, 2012
  2. Jeff KingJul 2, 2012

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.