Re: [PATCH v3 07/10] builtin/replace: teach listing using short, medium or full formats
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 18, 2013, 17:37 UTC
- Message-ID
- <xmqqioumjc1n.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CAP8UFD3UsdcDg2D2nysMZgGAxLebYm-qQX3LZfqdwF9gNbyxgA@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
Show 9 quoted lines
> On Wed, Dec 18, 2013 at 1:37 PM, Karsten Blees <karsten.blees@gmail.com> wrote:
>> Am 11.12.2013 08:46, schrieb Christian Couder:
>>> +enum repl_fmt { SHORT, MEDIUM, FULL };
>>
>> SHORT is predefined on Windows, could you choose another name?
>
> Ok, I will change to:
>
> enum repl_fmt { SHORT_FMT, MEDIUM_FMT, FULL_FMT };What are these for in the first place? Your "SHORT" conflicting with something totally unrelated is a sign that you should be naming them in a way that is more specific to your use. SHORT_FMT is still not specific enough to tell what they are for. With SHOW_REPLACE_ prefix, perhaps? Also perhaps give characterization better than their output lengths?
My quick read of show_reference() tells me that they are "name only", "name and value", and something else that does not seem very useful unless you are debugging.