Re: 'git show' with multiple revisions
- From
Jeff King <peff@peff.net>
- Date
- Apr 29, 2015, 15:53 UTC
- Message-ID
- <20150429155309.GB13518@peff.net>
- In-Reply-To
- <loom.20150429T174544-7@post.gmane.org>
On Wed, Apr 29, 2015 at 03:47:33PM +0000, Ed Avis wrote:
Show 17 quoted lines
> Jeff King <peff <at> peff.net> writes:
>
> >I think you want `git cat-file`:
> >
> > {
> > echo REV1:FILE
> > echo REV2:FILE
> > } |
> > git cat-file --batch
> >
> >This prints a header line for each output object which contains the size
> >of the object (so a parser reads a header line, then N bytes, then a
> >header line, N bytes, and so on).
>
> This looks like what I want but the object ids printed appear to be the id
> of the file in a given revision - not the id of the revision itself.
> So the ids in the output are not the same as the ones in the input.Correct. You are feeding a name which resolves to the blob sha1, so that's what cat-file will output for the object id.
> That's fine, as long as I can assume that the output entries are in the same > order as the input?
Yes, it will process and output them in order.
-Peff