Re: [PATCH 3/3] builtin/grep: allow implicit --no-index

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

 



On 01/11, Junio C Hamano wrote:
> Junio C Hamano <gitster@xxxxxxxxx> writes:
>
> > I however fail to see why that necessitates to change use_index to
> > no_index, making the code harder to follow by introducing double
> > negation.
>
> Oh, perhaps your thinking is that there are multiple ways that
> use_index can become 0 (i.e. it could come from the config, could
> come from an explicit --no-index, or it could come from the new
> default behaviour), and the error messages deep in the callchain
> (long after option parsing is done) want to react to these
> differences.

Yes, that's what I was thinking, sorry if I wasn't clear before.
Though I think the a bit more generic error messages are just fine, so
we can avoid the double negation.

> To that I am somewhat sympathetic, but then use_index can become 1
> (rather, no_index can become 0) in multiple ways (i.e. it can be
> because the user is just using the command as designed for its
> primary use case, or the user explicitly said --no-no-index), so I
> am not sure.
>
> In either case, I do not have a strong objection.  Avoiding double
> negation is merely a moderately strong general preference.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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