Re: [PATCH] fast-import: Allow filemodify to set the root
- From
Sverre Rabbelier <srabbelier@gmail.com>
- Date
- Oct 7, 2010, 13:58 UTC
- Message-ID
- <AANLkTikjzQ09XBxYZXXQf6XCme3FiLKtusZ0MLTa--mM@mail.gmail.com>
- In-Reply-To
- <1286448906-1424-1-git-send-email-david.barr@cordelta.com>
Heya,
On Thu, Oct 7, 2010 at 12:55, David Barr <david.barr@cordelta.com> wrote:
Show 5 quoted lines
> Most git commands do their writing to the object db via the index and > loose objects. When you just have a pile of trees you want to convert > into commits, this is wasteful; for performance-critical operations > like filter-branch --subdirectory-filter, one might want a sort of > hash-object --batch-to-pack to write a pack directly.
This means nothing to me, but perhaps I'm not the target audience of this paragraph.
> 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 use a given tree for its commits.
I'm with you up to "use a given tree for its commits".
Show 10 quoted lines
> 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 unpack it. For example, > > M 040000 4b825dc642cb6eb9a060e54bf8d69288fbee4904 "" > > is a synonym for the deleteall command.
Ok, so maybe I do understand, is it basically 'git read-tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904' for fast-import?
-- Cheers, Sverre Rabbelier