Re: [PATCH v2 2/6] git.c: add a NEED_UNIX_SOCKETS option for built-ins

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

 



On Fri, Sep 10 2021, Junio C Hamano wrote:

> Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:
>
>> Change the implementation of b5dd96b70ac (make credential helpers
>> builtins, 2020-08-13) to declare in the "struct cmd_struct" that
>> NO_UNIX_SOCKETS can't be set.
>
> It may happen to be that two credential-cache program are both
> related to the same CPP macro NO_UNIX_SOCKETS, but I think the
> pattern you are tackling with this topic is that a fallback
> definition of a function that is designed to always die when invoked
> misuses the parse-options API.  I do not want to see you invent a
> new bit in cmd_struct for each and every conditional that lets us
> define such a die-only fallback implementation.
>
> I may be missing something obvious, but can't the following suffice,
> and if not, why?

I think this is covered if you go on to read the rest of the commit
message, i.e. yes we could, but the trade-off is making the test and
users that might want to use --list-cmds=builtins hardcode these two as
special cases under the relevant prereq.

Hence doing this in the main git.c dispatch mechanism, if we can't ever
do anything useful with these it seems best to mark them as such at
compile-time in that dispatch mechanism.




[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