]> git.ipfire.org Git - thirdparty/git.git/commit - diff.c
diff --color: use $GIT_DIR/config
authorJunio C Hamano <junkio@cox.net>
Sat, 24 Jun 2006 11:06:23 +0000 (04:06 -0700)
committerJunio C Hamano <junkio@cox.net>
Sun, 25 Jun 2006 07:39:13 +0000 (00:39 -0700)
commit801235c5e6bff0ec1c4e41c9d46535ead3b693c1
tree6eca5d83b1e5e438a506ca7ab9ec2886a00331a2
parent29f4ad867cd15f4029c280c417f4a0866d5229a9
diff --color: use $GIT_DIR/config

This lets you use something like this in your $GIT_DIR/config
file.

[diff]
color = auto

[diff.color]
new = blue
old = yellow
frag = reverse

When diff.color is set to "auto", colored diff is enabled when
the standard output is the terminal.  Other choices are "always",
and "never".  Usual boolean true/false can also be used.

The colormap entries can specify colors for the following slots:

plain - lines that appear in both old and new file (context)
meta - diff --git header and extended git diff headers
frag - @@ -n,m +l,k @@ lines (hunk header)
old - lines deleted from old file
new - lines added to new file

The following color names can be used:

normal, bold, dim, l, blink, reverse, reset,
black, red, green, yellow, blue, magenta, cyan,
white

Signed-off-by: Junio C Hamano <junkio@cox.net>
cache.h
diff.c