Re: [PATCH v2 1/4] i18n: factorize more 'incompatible options' messages

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

 



Am 29.01.22 um 11:41 schrieb Jean-Noël AVILA:
> Le samedi 29 janvier 2022, 09:08:34 CET Johannes Sixt a écrit :
>> Am 29.01.22 um 00:58 schrieb Junio C Hamano:
>>> Also, isn't "if" in the name of the function misleading?  as far as
>>> I can tell, this function is not "check if these options are
>>> compatible and die if some are incompatible with each other", but
>>> the caller is convinced that these options are incompatible before
>>> it decides to call this function and there is no "if" in what this
>>> function can do.
>>
>> Good point.
> 
> I don't get the point: the function checks if incompatible options are present 
> on the command line and dies in such case. The caller does not know whether 
> the function will make the program die, it really depends on the result of the 
> check performed in the function. In case there's no or only one of the 
> options, the function does nothing.

The function call reads like

     die if options are incompatible

That sounds as if the caller were asking "are these options
incompatible?" But that is not what it wants to ask because it already
knows that the options are incompatible. It actually wants to ask "is
there any problem with these incompatible options?" The name Junio
suggested is die_for_incompatible_opts().

-- Hannes



[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