Re: [PATCH 1/1] bundle verify: error out if called without an object database
- Date: Tue, 28 May 2019 13:03:26 -0700
- From: Junio C Hamano <gitster@xxxxxxxxx>
- Subject: Re: [PATCH 1/1] bundle verify: error out if called without an object database
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)
> /* 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
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.