Re: [PATCH 2/6] diff.c: change the default for move coloring to zebra
- From
Stefan Beller <sbeller@google.com>
- Date
- Jun 28, 2017, 19:54 UTC
- Message-ID
- <CAGZ79kY2qhaefcjFJLDAuhFB_ZngGw7bKnzv-hA-5hmCfH3KOA@mail.gmail.com>
- In-Reply-To
- <xmqq60fgztud.fsf@gitster.mtv.corp.google.com>
On Tue, Jun 27, 2017 at 8:14 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 20 quoted lines
>> diff --git a/diff.h b/diff.h
>> index 98abd75521..9298d211d7 100644
>> --- a/diff.h
>> +++ b/diff.h
>> @@ -192,6 +192,7 @@ struct diff_options {
>> COLOR_MOVED_NO = 0,
>> COLOR_MOVED_PLAIN = 1,
>> COLOR_MOVED_ZEBRA = 2,
>> + COLOR_MOVED_DEFAULT = 2,
>> COLOR_MOVED_ZEBRA_DIM = 3,
>> } color_moved;
>> };
>
> Hmph. I would have expected that COLOR_MOVED_DEFAULT would not be
> part of the enum, but a
>
> #define COLOR_MOVED_DEFAULT COLOR_MOVED_ZEBRA
>
> I do not have a strong preference either way; it was just a bit
> unexpected.Yes it is not as one would expect. Originally I thought it could buy us some more protection via smart static analysis (to be invented yet), but now I am not so sure any more. Changed it to the #define.
Thanks.