git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jesse Hopkins <jesse.hops@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git bundle vs git rev-list
Date: Fri, 05 Dec 2014 15:01:46 -0800	[thread overview]
Message-ID: <xmqqlhmlog4l.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAL3By--xYnXFUdDP3MDxAxvfeBT3ArFrdAV=apzdWg6_kiD2Yg@mail.gmail.com> (Jesse Hopkins's message of "Fri, 5 Dec 2014 15:36:18 -0700")

Jesse Hopkins <jesse.hops@gmail.com> writes:

> 2. Is there a way to list commits contained in the bundle file itself?
>  This seems like it would be more robust than trying to re-create the
> commit list via 'git rev-list'.

"git bundle list-heads o.bndl" shows the positive endpoints, but
there is no corresponding "git bundle list-prereq" that shows the
prerequisite commits.

Running "git bundle verify o.bndl" in an empty directory will show
the negative endpoints that are required to be in the receiving
repository in its error message, e.g.

    $ git bundle verify ~/w/git.git/o.bndle
    error: Repository lacks these prerequisite commits:
    error: bf404025edf1d7f5a69aa07cbaa88622e9d528df 
    error: 15ab2081fff5b234ec5705a8645d39c1fdcf204c 
    ...

so collecting them would be one way to substitute "list-prereq".

Once you learned the positive and negative endpoints, running "git
rev-list --objects $positive_ones --not $negative_ones" should list
all the objects contained in the bundle.

  reply	other threads:[~2014-12-05 23:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-05 22:36 git bundle vs git rev-list Jesse Hopkins
2014-12-05 23:01 ` Junio C Hamano [this message]
2014-12-05 23:13 ` brian m. carlson
2014-12-05 23:40   ` Junio C Hamano
2014-12-05 23:42     ` brian m. carlson
2014-12-06  5:16 ` Jeff King

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=xmqqlhmlog4l.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jesse.hops@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).