Re: git commit file completion recently broke

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

 



On Thu, Dec 07, 2017 at 09:14:31AM +0100, Christian Couder wrote:

> > I do think it may make sense for
> > the "short" one to use NULL, like:
> >
> >   skip_to_optional_val(arg, "--relative, &arg)
> >
> > but maybe some other callers would be more inconvenienced (they may have
> > to current NULL back into the empty string if they want to string
> > "--foo" the same as "--foo=").

Oof, I lost all ability to type in that last sentence. :)

It looks like you deciphered my meaning, though.

> I discussed that with Junio and yeah there are many callers that want
> "--foo" to be the same as "--foo=".

Yeah, if this is the only case, then just calling the "_default" variant
with NULL for this instance makes sense to me.

> By the way I wonder if "--relative=" makes any sense, and if we should
> emit a warning or just die in this case.

I also wondered about that. It does function as "relative to the root of
the tree". But of course if you want that you can just omit
"--relative". Still, it could be a minor convenience for somebody who is
filling in "--relative" in a script. That's reaching, I think, but I
don't see any particular reason to _forbid_ it (especially since it has
worked for many years).

-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