git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>,
	git@vger.kernel.org,
	"Konstantin Ryabitsev" <konstantin@linuxfoundation.org>,
	"SZEDER Gábor" <szeder.dev@gmail.com>,
	"Johannes Schindelin" <johannes.schindelin@gmx.de>
Subject: Re: [PATCH 1/1] bundle verify: error out if called without an object database
Date: Tue, 28 May 2019 17:04:28 -0400	[thread overview]
Message-ID: <20190528210428.GE24650@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqftoy1h4h.fsf@gitster-ct.c.googlers.com>

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

> Jeff King <peff@peff.net> 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

  reply	other threads:[~2019-05-28 21:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-27 19:59 [PATCH 0/1] bundle verify: improve the user experience when called without a .git/ directory Johannes Schindelin via GitGitGadget
2019-05-27 19:59 ` [PATCH 1/1] bundle verify: error out if called without an object database Johannes Schindelin via GitGitGadget
2019-05-27 20:08   ` brian m. carlson
2019-05-27 20:20     ` Johannes Schindelin
2019-05-28  1:51   ` Jeff King
2019-05-28 11:17     ` Johannes Schindelin
2019-05-28 20:58       ` Jeff King
2019-05-28 20:03     ` Junio C Hamano
2019-05-28 21:04       ` Jeff King [this message]
2019-05-28 21:09         ` Junio C Hamano
     [not found] ` <pull.226.v2.git.gitgitgadget@gmail.com>
     [not found]   ` <8467593c158ffac56897cf02e165173d9c0b5880.1558988458.git.gitgitgadget@gmail.com>
2019-05-27 20:25     ` [PATCH v2 " brian m. carlson

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20190528210428.GE24650@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=konstantin@linuxfoundation.org \
    --cc=szeder.dev@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).