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:17:41PM +0200, Johannes Schindelin wrote:

> > 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



[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