From: Junio C Hamano <gitster@pobox.com>
To: Ed Avis <eda@waniasset.com>
Cc: git@vger.kernel.org
Subject: Re: 'git show' with multiple revisions
Date: Wed, 29 Apr 2015 08:53:24 -0700 [thread overview]
Message-ID: <xmqqtwvz53t7.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <loom.20150429T174544-7@post.gmane.org> (Ed Avis's message of "Wed, 29 Apr 2015 15:47:33 +0000 (UTC)")
Ed Avis <eda@waniasset.com> writes:
> 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.
Actually you are asking for REV1:FILE and REV2:FILE, and you are
getting these object IDs in the output (you are not asking for REV1
or REV2 henace you will not see these commit object IDs).
"cat-file --batch" will give you the objects in the order you ask.
I _think_ you can even do that interactively (i.e. you spawn the
process, you feed one object name to its input, you consume its
output by reading the header and then given number of bytes, and
then you feed the next object name to its input, and so on) without
deadlocking yourself.
next prev parent 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
2015-04-29 15:53 ` Junio C Hamano [this message]
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=xmqqtwvz53t7.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=eda@waniasset.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.