git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [RFC/PATCH] builtin/blame: darken redundant line information
Date: Tue, 13 Jun 2017 10:13:43 -0700	[thread overview]
Message-ID: <CAGZ79kYV8Ngis=ux50Zs1r5XOBUJ=hw2=8BEkNqk7PiGamX0AA@mail.gmail.com> (raw)
In-Reply-To: <xmqqa85b9626.fsf@gitster.mtv.corp.google.com>

On Tue, Jun 13, 2017 at 10:00 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Stefan Beller <sbeller@google.com> writes:
>
>> * As you have an individual color setup, maybe you can fix this
>>   for you by setting the appropriate slots to your perception of
>>   dimmed?
>
> I do not think it is possible with only {new,old}{,alternative} 4
> colors.
>
> Consider this diff:
>
>          context
>         -B
>         -B
>         -B
>         -A
>         -A
>         -A
>          context
>         +A
>         +A
>         +A
>         +B
>         +B
>         +B
>          context
>
> Two blocks (A and B) that are adjacent are moved but swapped to form
> a pair of new adjacent blocks.
>
> We would like the boundary between the last "-B" and the first "-A"
> to be highlighted differently; all other "-A" and "-B" lines do not
> disappear but go elsewhere, so they want to be dimmed.
>
> The newly added 6 lines are actually moved from elsewhere, and we
> would like the boundary between the last "+A" and the first "+B" to
> be highlighted differently, and others are dimmed.
>
> So I'd think you would need at least two kinds of highlight colors
> plus a dimmed color.

Here is what currently happens:

>
>          context
>         -B              dim  oldMoved
>         -B              dim  oldMoved
>         -B              highlight oldMovedAlternative
>         -A              highlight oldMovedAlternative
>         -A              dim  oldMoved
>         -A              dim  oldMoved
>          context
>         +A              dim  newMoved
>         +A              dim  newMoved
>         +A              highlight  newMovedAlternative
>         +B              highlight  newMovedAlternative
>         +B              dim  newMoved
>         +B              dim  newMoved
>          context
>

So the there is only one "highlight" color in each block.
There is no separate hightligh-for-ending-block and
highlight-for-new-block respectively.

> If old_moved and old_moved_alternative are meant for highlighting
> "-B" and "-A" above differently, while new_moved and
> new_moved_alternative are for highlighting "+A" and "+B"
> differently, you'd need a way to specify "dim" for old and new moved
> lines, which seems to be impossible with only 4 new colors.

The standard non alternative was dim in my mind for the
adjacentbounds mode.

If you prefer to have the alternate mode, you rather want no dim,
no highlight, but just 2 alternating colors of equal attention-drawing.

  reply	other threads:[~2017-06-13 17:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-13  2:31 [RFC/PATCH] builtin/blame: darken redundant line information Stefan Beller
2017-06-13 15:25 ` Junio C Hamano
2017-06-13 16:21   ` Stefan Beller
2017-06-13 17:00     ` Junio C Hamano
2017-06-13 17:13       ` Stefan Beller [this message]
2017-06-13 17:19         ` Junio C Hamano
2017-06-13 17:30           ` Stefan Beller
2017-06-13 17:33             ` Junio C Hamano
2017-06-13 17:44               ` Stefan Beller
2017-06-13 17:48                 ` Junio C Hamano
2017-06-13 18:00                   ` Stefan Beller
2017-06-13 18:06                 ` Junio C Hamano
2017-06-13 23:42 ` Jonathan Tan
2017-06-14  0:33   ` Stefan Beller
2017-07-26 23:04 ` [PATCHv2] builtin/blame: highlight interesting things Stefan Beller
2017-07-26 23:29   ` Junio C Hamano
2017-07-26 23:57     ` Stefan Beller
2017-07-27 18:27       ` Junio C Hamano
2017-07-27 18:57         ` Stefan Beller

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to='CAGZ79kYV8Ngis=ux50Zs1r5XOBUJ=hw2=8BEkNqk7PiGamX0AA@mail.gmail.com' \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).