Re: [PATCH] diff: --color-moved: rename "dimmed_zebra" to "dimmed-zebra"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 24, 2018 at 6:09 PM Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:
> Eric Sunshine wrote:
> > Subject: diff: --color-moved: rename "dimmed_zebra" to "dimmed-zebra"
>
> It would be clearer to say something like
>
>         diff --color-moved: add "dimmed-zebra" synonym for "dimmed_zebra"

That could work, although doesn't really convey that "dimmed_zebra" is
undesirable. Perhaps:

    diff --color-moved: add "dimmed-zebra"; deprecate "dimmed_zebra"

Perhaps, not worth a re-roll, though(?).

> > The --color-moved "dimmed_zebra" mode (with an underscore) is an
> > anachronism. Most options and modes are hyphenated. It is more difficult
> > to type and somewhat more difficult to read than those which are
> > hyphenated. Therefore, rename it to "dimmed-zebra", and nominally
> > deprecate "dimmed_zebra".
>
> Hm.  Looks like dimmed_zebra was introduced in v2.15.0-rc0~16^2~2
> (2017-06-30), so it has been around for a while (about a year).  But I
> would like to be able to simplify by getting rid of it.
>
> Is there anything we can do to make it possible to remove eventually?
> For example, should we (eventually, after dimmed-zebra has existed
> for some time) start warning when people use dimmed_zebra to encourage
> them to use dimmed-zebra instead?

Wanting to simplify by eventually getting rid of the old name is
understandable, but my hope is that we don't have to do so. Given that
this nominal deprecation involves one short sentence in the
documentation and one strcmp() for backward compatibility, it seems
unlikely to become a maintenance burden. In contrast to "git branch
-l", short for --create-reflog, but which people intuitively expect to
mean --list, "freeing up" this name for some other purpose is
unnecessary, so a concrete deprecation may be overkill. As well, the
extra burden on Junio to hang onto deprecation and eventual removal
patches far into the future seems unwarranted.

> > +dimmed-zebra::
> >       Similar to 'zebra', but additional dimming of uninteresting parts
> >       of moved code is performed. The bordering lines of two adjacent
> >       blocks are considered interesting, the rest is uninteresting.
> > +     `dimmed_zebra` is a deprecated synonym.
>
> Thanks for including that note.  It means that when people see
> dimmed_zebra in scripts or configuration they won't have to be
> mystified about why it works.
>
> I don't have any good ideas about deprecating more aggressively, and
> the patch looks good, so
>
> Reviewed-by: Jonathan Nieder <jrnieder@xxxxxxxxx>

Thanks for the review.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux