]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/blame: dim uninteresting metadata lines
authorStefan Beller <sbeller@google.com>
Tue, 24 Apr 2018 00:08:58 +0000 (17:08 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 24 Apr 2018 02:03:13 +0000 (11:03 +0900)
commitcdc2d5f11f1ab931d2f39fefc6197ea1cab220a6
tree349247d8fbb196429e07d1c3af0696219657625d
parent75e5e9c3f7f9615ae2ee38a839aafbbe642a735a
builtin/blame: dim uninteresting metadata 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, date) are repeated. A reader may not be interested in those,
so offer an option to color the information that is repeated from the
previous line differently. Traditionally, we use CYAN for lines that
are less interesting than others (e.g. hunk header), so go with that.

The command line option '--color-lines' will trigger the coloring of
repeated lines, and the config option 'color.blame.colorLines' is
provided to select the color. Setting the config option doesn't imply
that repeated lines are colored. A later patch will introduce a config
to enable this mode by default.

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 [new file with mode: 0755]