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

Re: Merge after directory rename ?

From
Jeff King <peff@peff.net>
Date
Aug 23, 2011, 19:13 UTC
Message-ID
<20110823191350.GA4016@sigill.intra.peff.net>
In-Reply-To
<CAMOZ1Bt8cP146xiDXfSA-naSOaS3AC8pUZgW12=3TMg2JGCD=w@mail.gmail.com>
On Sun, Aug 21, 2011 at 11:53:34PM +0000, Michael Witten wrote:
Show 10 quoted lines
> This is because git fundamentally tracks content, and paths are just
> one kind of content associated with another blob of content.
> Consequently, git really knows next to nothing about directories, so
> it's not too surprising that git doesn't bother finding such a
> DIRECTORY rename anyway (at most, git would detect a FILE rename, and
> your FILE `dir1/file2' has nothing to do with, say, the FILE
> `dir1/file1' being renamed `dir2/file1').
> 
> Still, some command line switches could be useful to help the user
> express to git what should be going on in a case such as yours.

FYI, Yann Dirson was working on some patches to detect directory renames, but we haven't heard anything for a while. The last version I could find was:

  http://thread.gmane.org/gmane.comp.version-control.git/163328
-Peff
Previous: Michael Witten
Message 8 of 8 in “Merge after directory rename ?”
  1. Marcin WiśnickiAug 21, 2011
  2. Michael WittenAug 21, 2011
  3. Michael WittenAug 21, 2011
  4. Marcin WiśnickiAug 22, 2011
  5. Michael WittenAug 22, 2011
  6. Marcin WiśnickiAug 22, 2011
  7. Michael WittenAug 23, 2011
  8. Jeff KingAug 23, 2011

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.