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

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

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Oct 8, 2010, 07:23 UTC
Message-ID
<4CAEC6E6.5000305@viscovery.net>
In-Reply-To
<20101008070511.GA4671@burratino>
Am 10/8/2010 9:05, schrieb Jonathan Nieder:
Show 12 quoted lines
> Johannes Sixt wrote:
>> Am 10/7/2010 22:28, schrieb Jonathan Nieder:
> 
>>> | 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.
>>
>> 1. But when an object already exists in the db, it won't be written again,
>> will it?
> 
> In David's application, the trees already exist, but the commits are new.
But then what has this to do with "allow filemodify to set the root"?
> I suppose supporting M 040000 <tree> "" and C <path> "" could still
> be a good idea in that case anyway, for the convenience of front-end
> authors.

What is the special new thing here? That "" means 'empty string' == 'tree at the root'? If so:

1. Then this is the missing piece in the justification. Then I could buy
that the observed speed-up is due to the reuse of an existing tree object
(which avoids parsing it and re-constructing it from its pieces because
fast-imports syntax didn't allow it otherwise). But it has nothing to do
with new loose objects (the re-constructed object would be identical to an
existing one).
2. Without this patch, would this syntax create a tree object with a name
consisting of two double-quotes in the root? Or would it be a syntax
error? How would one construct such an entry with this patch?
-- Hannes
Previous: Jonathan NiederNext: Jonathan Nieder
Message 10 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.