git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH] builtin/blame: darken redundant line information

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 13, 2017, 17:00 UTC
Message-ID
<xmqqa85b9626.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAGZ79kYR+qh1X-dQixdpDbcr5z-DJ2mkdncaVn_8y90kNco9tw@mail.gmail.com>
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.

         context
        -B		dim
        -B		dim
        -B		highlight
        -A		highlight
        -A		dim
        -A		dim
         context
        +A		dim
        +A		dim
        +A		highlight
        +B		highlight
        +B		dim
        +B		dim
         context

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.

Previous: Stefan BellerNext: Stefan Beller
Message 4 of 19 in “builtin/blame: darken redundant line information”
  1. builtin/blame: darken redundant line informationStefan Beller, Jun 13, 2017
  2. Junio C HamanoJun 13, 2017
  3. Stefan BellerJun 13, 2017
  4. Junio C HamanoJun 13, 2017
  5. Stefan BellerJun 13, 2017
  6. Junio C HamanoJun 13, 2017
  7. Stefan BellerJun 13, 2017
  8. Junio C HamanoJun 13, 2017
  9. Stefan BellerJun 13, 2017
  10. Junio C HamanoJun 13, 2017
  11. Stefan BellerJun 13, 2017
  12. Junio C HamanoJun 13, 2017
  13. Jonathan TanJun 13, 2017
  14. Stefan BellerJun 14, 2017
  15. [PATCHv2] builtin/blame: highlight interesting thingsStefan Beller, Jul 26, 2017
  16. Junio C HamanoJul 26, 2017
  17. Stefan BellerJul 26, 2017
  18. Junio C HamanoJul 27, 2017
  19. Stefan BellerJul 27, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.