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

Re: [PATCH] fast-import: Allow filemodify to set the root

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Oct 7, 2010, 20:28 UTC
Message-ID
<20101007202847.GA13234@burratino>
In-Reply-To
<AANLkTikjzQ09XBxYZXXQf6XCme3FiLKtusZ0MLTa--mM@mail.gmail.com>
Sverre Rabbelier wrote:
> This means nothing to me
Sorry for the lack of clarity.  Probably I should have just said:
| For a command (like filter-branch --subdirectory-filter) that wants
| to commit a lot of trees that already exist in the object db, writing
| undeltified objects as loose files only to repack them later can
| involve a significant amount[*] of overhead.
|
| Fortunately we have fast-import (which is one of the only git commands
| that will write to a pack directly) but there is not an advertised way
| to tell fast-import to commit a given tree without unpacking it.
|
| This patch changes that, by allowing
|
|        M 040000 <tree id> ""
|
| as a filemodify line in a commit to reset to a particular tree without
| any need to parse it.  For example,
|
|	M 040000 4b825dc642cb6eb9a060e54bf8d69288fbee4904 ""
|
| is a synonym for the deleteall command.
[*] how significant?  Numbers are always nice. :)
> Ok, so maybe I do understand, is it basically 'git read-tree
> 4b825dc642cb6eb9a060e54bf8d69288fbee4904' for fast-import?
Yep.
Thanks.
Previous: Sverre RabbelierNext: Sverre Rabbelier
Message 3 of 31 in “fast-import: Allow filemodify to set the root”
  1. fast-import: Allow filemodify to set the rootDavid Barr, Oct 7, 2010
  2. Sverre RabbelierOct 7, 2010
  3. Jonathan NiederOct 7, 2010
  4. Sverre RabbelierOct 7, 2010
  5. David BarrOct 7, 2010
  6. fast-import: Allow filemodify to set the rootDavid Barr, Oct 7, 2010
  7. Sverre RabbelierOct 7, 2010
  8. Johannes SixtOct 8, 2010
  9. Jonathan NiederOct 8, 2010
  10. Johannes SixtOct 8, 2010
  11. Jonathan NiederOct 8, 2010
  12. Ramkumar RamachandraOct 8, 2010
  13. Gabriel FilionOct 8, 2010
  14. David Michael BarrOct 8, 2010
  15. Sverre RabbelierOct 8, 2010
  16. Jonathan NiederOct 8, 2010
  17. David Michael BarrOct 9, 2010
  18. Sverre RabbelierOct 9, 2010
  19. fast-import: Allow filemodify to set the rootDavid Barr, Oct 10, 2010
  20. Jonathan NiederOct 11, 2010
  21. 0/2 Re: fast-import: Allow filemodify to set the rootJonathan Nieder, Oct 18, 2010
  22. 1/2 fast-import: filemodify after M 040000 <tree> "" crashesJonathan Nieder, Oct 18, 2010
  23. Sverre RabbelierOct 18, 2010
  24. Jonathan NiederOct 18, 2010
  25. fast-import: do not clear notes in do_change_note_fanout()Jonathan Nieder, Oct 20, 2010
  26. 2/2 fast-import: tighten M 040000 syntaxJonathan Nieder, Oct 18, 2010
  27. Documentation/fast-import: put explanation of M 040000 <dataref> "" in contextJonathan Nieder, Jan 16, 2011
  28. Junio C HamanoJan 18, 2011
  29. Jonathan NiederJan 18, 2011
  30. Junio C HamanoJan 18, 2011
  31. Jonathan NiederJan 18, 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.