public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jeff King <peff@peff•net>
To: Ed Avis <eda@waniasset•com>
Cc: git@vger•kernel.org
Subject: Re: 'git show' with multiple revisions
Date: Wed, 29 Apr 2015 11:53:10 -0400	[thread overview]
Message-ID: <20150429155309.GB13518@peff.net> (raw)
In-Reply-To: <loom.20150429T174544-7@post.gmane.org>

On Wed, Apr 29, 2015 at 03:47:33PM +0000, Ed Avis wrote:

> 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

  reply	other threads:[~2015-04-29 15:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-28 10:10 'git show' with multiple revisions Ed Avis
2015-04-29  2:04 ` Jeff King
2015-04-29 15:47   ` Ed Avis
2015-04-29 15:53     ` Jeff King [this message]
2015-04-29 15:53     ` Junio C Hamano
2015-04-29 16:01       ` Ed Avis
2015-04-29 16:08         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150429155309.GB13518@peff.net \
    --to=peff@peff$(echo .)net \
    --cc=eda@waniasset$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox