Re: [PATCH] submodule--helper.c: add only-active to foreach
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 15, 2020, 17:03 UTC
- Message-ID
- <xmqq7dxdm8qi.fsf@gitster.c.googlers.com>
- In-Reply-To
- <b45268b1-de5f-051c-f956-8a17c067f4c6@gmail.com>
Guillaume Galeazzi <guillaume.galeazzi@gmail.com> writes:
Show 5 quoted lines
> Goal here was to avoid magic number, but after looking to the code it
> seem accepted that true is 1 and false is 0. To comply with that, in
> next version it will be replace it with:
>
> if (FOREACH_BOOL_FILTER_NOT_SET != info->active_only) {It still is unusual to have a constant on the left hand side of the "!=" or "==" operator, though. Having a constant on the left hand side of "<" and "<=" is justifiable, but not for "!=" and "==".