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

Re: [PATCHv2] builtin/blame: highlight interesting things

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 26, 2017, 23:29 UTC
Message-ID
<xmqqwp6uojzr.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170726230425.24307-1-sbeller@google.com>
Stefan Beller <sbeller@google.com> writes:
Show 18 quoted lines
> When using git-blame lots of lines contain redundant information, for
> example in hunks that consist of multiple lines, the metadata (commit name,
> author) are repeated. A reader may not be interested in those, so darken
> (commit, author) information that is the same as in the previous line.
>
> Choose a different approach for dates and imitate a 'temperature cool down'
> for the dates. Compute the time range of all involved blamed commits
> and then color
>  * lines of old commits dark (aged 0-50% in that time range)
>  * lines of medium age normal (50-80%)
>  * lines of new age red (80-95%)
>  * lines just introduced bright yellow (95-100%)
>
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
>
>   I played around with it a bit more, using a different color scheme
>   for dates, http://i.imgur.com/redhaLi.png

I do agree with what this one tries to do, in that a block of lines tend to share the same metainfo as they come from the same commit and it is distracting to see them repeatedly---doing something to make their "these are in one group" nature stand out will give us a much better presentation.

But does this particular implementation work well for people who use black in on white background? "Darken to make it less distracting" may not work on both white-on-black and black-on-white users.

"Show the background only by replacing the letters with SP for metainfo that are same as previous line" would work for folks from either camp, I would imagine. And that should be a single feature, that can be enabled independently from the age based coloring.

The age coloring is much harder to make it work for folks from both camps at the same time with the same color selection. Yellow on white would be terribly unreadable for black-on-white folks, for example.

If you make "make it less distracting by blanking them out (not 'darken them')" feature without the age coloring, that can be usable immediately by folks from both camps, even if you cannot find a way to do the age coloring that would satisfy both groups. One group can just leave the knob off and not use the age coloring, while the other group can use it and people from both camps will be happier than the status quo.

Thanks.
Previous: Stefan BellerNext: Stefan Beller
Message 16 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.