Re: [PATCH v7 01/9] Add column layout skeleton and git-column
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 14, 2012, 18:29 UTC
- Message-ID
- <7vbonzqbml.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CACsJy8D8U7L4P+z9DT6hq0Rze=p2M6UZKMCqia1kN-QGJFE_zg@mail.gmail.com>
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
Show 15 quoted lines
> 2012/3/14 Junio C Hamano <gitster@pobox.com>:
>> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
>>
>>> +#define COL_ENABLE(c) ((c) & COL_ENABLE_MASK)
>>
>> That is a misleading name for a boolean macro. It looked as if this
>>
>>> + assert(COL_ENABLE(colopts) != COL_AUTO);
>>
>> was asking the helper to *enable* the column machinery with the given set
>> of option in colopts, and expecting the helper to answer how it enabled
>> ("I took the 'automatic' decision path"). But that is not what is
>> happening.
> ...
> I'm running out of names. Suggestions are welcome.An obvious interface to expose to API users (as opposed to internal details to the implementation) would be "extern bool COL_ENABLED(opts);", no?