Re: [PATCH 1/1] bundle verify: error out if called without an object database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 28, 2019 at 01:03:26PM -0700, Junio C Hamano wrote:

> Jeff King <peff@xxxxxxxx> writes:
> 
> > As Gábor noted in the earlier thread, if the bundle doesn't have any
> > prerequisites, this _used_ to work before b1ef400eec (setup_git_env:
> > avoid blind fall-back to ".git", 2016-10-20). I don't know if anybody
> > cares about that case or not, but we could do something like:
> >
> >   if (p->nr)
> > 	verify_prerequisites();
> >
> >   /* otherwise, fall through to the printing portions */
> >
> > and then just check for a repository in verify_prerequisites(), which is
> > the only part that needs to look at the repository object at all.
> 
> It depends on how important we consider the use of bundles that can
> be cloned from.  If it is important enough, what you suggest is an
> improvement worth doing over what Dscho did.
> 
> A bundle that can be cloned from (i.e. no prerequisite) is meant to
> be used without having any repository by definition, so it is a
> grave regression to require object store when verifying such a
> bundle.
> 
> On the other hand, a bundle that cannot be cloned from but only
> usabel for an incremental sneaker-net update needs receiving
> repository anyway, so it is perfectly fine to require object store.

I was thinking this was matters only for "bundle verify", which is not
all that interesting (either you can clone from it, or you cannot).

It is also used as part of unbundle(), which is called from the
transport code. But at that point of a clone, we'd already have created
the new repository we're writing into. I.e., "git clone .../foo.bundle"
still works fine either way.

So I guess you are asking only about the part that I dismissed above as
"not all that interesting". I.e., do people actually run:

  git bundle verify foo.bundle &&
  git clone foo.bundle

That is not nonsense, per-se, but it is somewhat pointless since the
clone will verify the bundle itself anyway. But then, I guess I do not
see much point in anyone calling "bundle verify" in the first place.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux