Merge branch 'sb/blame-color'
authorJunio C Hamano <gitster@pobox.com>
Wed, 30 May 2018 05:04:09 +0000 (14:04 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 May 2018 05:04:09 +0000 (14:04 +0900)
"git blame" learns to unhighlight uninteresting metadata from the
originating commit on lines that are the same as the previous one,
and also paint lines in different colors depending on the age of
the commit.

* sb/blame-color:
builtin/blame: add new coloring scheme config
builtin/blame: highlight recently changed lines
builtin/blame: dim uninteresting metadata lines

1  2 
Documentation/config.txt
builtin/blame.c
index 460c14f0476f0c1c2c85fbbb37b00875c38f3548,4eb030ed43736959a111d2aa9dc6401a64a75837..7d8383433ce9995c1950705fb9b345eff1bd652d
@@@ -1251,15 -1218,33 +1251,42 @@@ color.status.<slot>:
        status short-format), or
        `unmerged` (files which have unmerged changes).
  
+ color.blame.repeatedLines::
+       Use the customized color for the part of git-blame output that
+       is repeated meta information per line (such as commit id,
+       author name, date and timezone). Defaults to cyan.
+ color.blame.highlightRecent::
+       This can be used to color the metadata of a blame line depending
+       on age of the line.
+ +
+ This setting should be set to a comma-separated list of color and date settings,
+ starting and ending with a color, the dates should be set from oldest to newest.
+ The metadata will be colored given the colors if the the line was introduced
+ before the given timestamp, overwriting older timestamped colors.
+ +
+ Instead of an absolute timestamp relative timestamps work as well, e.g.
+ 2.weeks.ago is valid to address anything older than 2 weeks.
+ +
+ It defaults to 'blue,12 month ago,white,1 month ago,red', which colors
+ everything older than one year blue, recent changes between one month and
+ one year old are kept white, and lines introduced within the last month are
+ colored red.
+ blame.coloring::
+       This determines the coloring scheme to be applied to blame
+       output. It can be 'repeatedLines', 'highlightRecent',
+       or 'none' which is the default.
 +color.transport::
 +      A boolean to enable/disable color when pushes are rejected. May be
 +      set to `always`, `false` (or `never`) or `auto` (or `true`), in which
 +      case colors are used only when the error output goes to a terminal.
 +      If unset, then the value of `color.ui` is used (`auto` by default).
 +
 +color.transport.rejected::
 +      Use customized color when a push was rejected.
 +
  color.ui::
        This variable determines the default value for variables such
        as `color.diff` and `color.grep` that control the use of color
diff --cc builtin/blame.c
Simple merge