Subject: Re: [WIP/PATCH] Teach fast-import to print the id of each imported commit

From: Sam Vilain <[email-masked]>
Date: Sun, 04 Jul 2010 12:02:40 +1200

On Fri, 2010-07-02 at 10:40 -0500, Jonathan Nieder wrote:
> Sverre Rabbelier wrote:
> > On Fri, Jul 2, 2010 at 07:12, Jonathan Nieder <[email-masked]> wrote:
> 
> >> A ‘cat’ command (suggested by David) would also be useful, so the
> >> caller can read trees and blobs before they are accessible through
> >> the object db.  The svn importer would use this when applying
> >> (svndiff0-format) deltas to import changes to regular files.
> >
> > How would the output be delimited? The same way fast-import expects
> > its blob input?
> 
> Right.  I was imagining something like
> 
>  <blob hash> blob <size>
>  ... content ...
>  <blank line>
> 
> à la cat-file --batch.  Hopefully by the end of this weekend, if no
> one else gets to it first.

It should be very simple to implement --batch-verify as well, which is
essentially the same thing, just only printing the header and not the
contents.

How hard do you think it would be to implement a 'rev-parse' command?
Perhaps you can see where this is going... :-)

Sam