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

how to do directory renames in fast-import

From
DFDavid Frech <david@nimblemachines.com>
Date
Jul 10, 2007, 01:09 UTC
Message-ID
<7154c5c60707091809y7e0b67d5u3f94658b7e814325@mail.gmail.com>

Git can track file renames implicitly. If I delete and then add (under a different name) the same content, git will figure that out.

But if a directory was renamed, I have no way to tell fast-import about it. I can't delete the directory (using a 'D' command) and then add it back (with a different name) with all its contents, because my source material (an svn dump file) doesn't tell me, at that point, about all the files involved because nothing about them has changed.

fast-import knows about the contents of the directory I want to rename, but doesn't give me a primitive to do the rename. Is this something we need to add? My frontend could keep track of this, but I would duplicating work that fast-import is already doing.

Cheers,
- David
-- 
If I have not seen farther, it is because I have stood in the
footsteps of giants.
Next: Shawn O. Pearce
Message 1 of 10 in “how to do directory renames in fast-import”
  1. David FrechJul 10, 2007
  2. Support wholesale directory renames in fast-importShawn O. Pearce, Jul 10, 2007
  3. David FrechJul 10, 2007
  4. Uwe Kleine-KönigJul 10, 2007
  5. Shawn O. PearceJul 10, 2007
  6. David FrechJul 10, 2007
  7. Shawn O. PearceJul 11, 2007
  8. David FrechJul 11, 2007
  9. Rogan DawesJul 10, 2007
  10. Shawn O. PearceJul 10, 2007

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.