git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jeff King <peff@peff.net>
Date
May 28, 2019, 20:58 UTC
Message-ID
<20190528205839.GD24650@sigill.intra.peff.net>
In-Reply-To
<nycvar.QRO.7.76.6.1905281309490.44@tvgsbejvaqbjf.bet>
On Tue, May 28, 2019 at 01:17:41PM +0200, Johannes Schindelin wrote:
Show 19 quoted lines
> > 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.
> 
> I am not so sure that I feel comfortable with optimizing for the no-op
> case. Because that's essentially what this boils down to: if there are no
> prerequisites, there is not a whole lot to do.
> 
> And I'd rather have the command be consistent about its demands, to abide
> by the Law of Least Surprise.
I'm OK with that.

Since the breakage was technically attributable to my commit (I say technically because flushing out these kinds of bugs was exactly the point of it), I feel slightly guilty that I might have broken somebody's oddball workflow. So I tend to err on the side of restoring the original behavior in that case, even if I can't conceive of it as being particularly useful. :)

But if nobody is actually in support of it, and given that it has already been broken for 2 years, I certainly do not mind waiting to see if anybody screams.

-Peff
Previous: Johannes SchindelinNext: Junio C Hamano
Message 7 of 11 in “bundle verify: improve the user experience when called without a .git/ directory”
  1. 0/1 bundle verify: improve the user experience when called without a .git/ directoryJohannes Schindelin via GitGitGadget, May 27, 2019
  2. 1/1 bundle verify: error out if called without an object databaseJohannes Schindelin via GitGitGadget, May 27, 2019
  3. brian m. carlsonMay 27, 2019
  4. Johannes SchindelinMay 27, 2019
  5. Jeff KingMay 28, 2019
  6. Johannes SchindelinMay 28, 2019
  7. Jeff KingMay 28, 2019
  8. Junio C HamanoMay 28, 2019
  9. Jeff KingMay 28, 2019
  10. Junio C HamanoMay 28, 2019
  11. brian m. carlsonMay 27, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.