]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/blame.c
builtin/blame: highlight recently changed lines
authorStefan Beller <sbeller@google.com>
Tue, 24 Apr 2018 00:08:59 +0000 (17:08 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 24 Apr 2018 02:03:15 +0000 (11:03 +0900)
commit25d5f52901f0d56b2e3df06b53062ee599b0403b
tree8fff108b599529db6a5c0572cacc0f61c52b2bb7
parentcdc2d5f11f1ab931d2f39fefc6197ea1cab220a6
builtin/blame: highlight recently changed lines

Choose a different color for dates and imitate a 'temperature cool down'
depending upon age.

Originally I had planned to have the temperature cool down dependent on
the age of the project or file for example, as that might scale better,
but that can be added on top of this commit, e.g. instead of giving a
date, you could imagine giving a percentage that would be the linearly
interpolated between now and the beginning of the file.

Similarly to the previous patch, this offers the command line option
'--color-by-age' to enable this mode and the config option
'color.blame.highlightrecent' to select colors. A later patch will offer
a config option to select the default mode.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt
builtin/blame.c
t/t8012-blame-colors.sh