All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Jeff King" <peff@peff.net>
Subject: Re: [PATCH 2/6] diff.c: change the default for move coloring to zebra
Date: Wed, 28 Jun 2017 12:54:33 -0700	[thread overview]
Message-ID: <CAGZ79kY2qhaefcjFJLDAuhFB_ZngGw7bKnzv-hA-5hmCfH3KOA@mail.gmail.com> (raw)
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:
>> 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.

  reply	other threads:[~2017-06-28 19:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28  0:56 [PATCH 0/6] Fixing up sb/diff-color-moved Stefan Beller
2017-06-28  0:56 ` [PATCH 1/6] diff.c: factor out shrinking of potential moved line blocks Stefan Beller
2017-06-28  0:56 ` [PATCH 2/6] diff.c: change the default for move coloring to zebra Stefan Beller
2017-06-28  3:14   ` Junio C Hamano
2017-06-28 19:54     ` Stefan Beller [this message]
2017-06-28  0:56 ` [PATCH 3/6] diff.c: better reporting on color.moved bogus configuration Stefan Beller
2017-06-28  0:56 ` [PATCH 4/6] Documentation/diff: reword color moved Stefan Beller
2017-06-28  3:25   ` Junio C Hamano
2017-06-28  0:56 ` [PATCH 5/6] diff.c: omit uninteresting moved lines Stefan Beller
2017-06-28  3:31   ` Junio C Hamano
2017-06-28 20:00     ` Stefan Beller
2017-06-28  0:56 ` [PATCH 6/6] diff.c: detect blocks despite whitespace changes Stefan Beller
2017-06-28  3:41   ` Junio C Hamano
2017-06-28  5:06     ` Junio C Hamano
2017-06-28 20:36       ` Stefan Beller
2017-06-28 21:16         ` Junio C Hamano
2017-06-29 21:01       ` Stefan Beller
2017-06-29 23:51         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGZ79kY2qhaefcjFJLDAuhFB_ZngGw7bKnzv-hA-5hmCfH3KOA@mail.gmail.com \
    --to=sbeller@google.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.