aboutsummaryrefslogtreecommitdiff
path: root/git-checkout.sh
diff options
context:
space:
mode:
authorWincent Colaiuta <win@wincent.com>2007-12-07 13:35:10 +0100
committerJunio C Hamano <gitster@pobox.com>2007-12-08 02:53:19 -0800
commit4af756f31b0696ed1ca6ad10dc6d7053477edc16 (patch)
treef95f0781c3090151b73b4d18b3284898c9934492 /git-checkout.sh
parent8e566f24b369836c43d720e4246a152b0e7724c6 (diff)
downloadgit-4af756f31b0696ed1ca6ad10dc6d7053477edc16.tar.gz
git-4af756f31b0696ed1ca6ad10dc6d7053477edc16.tar.xz
Teach "git add -i" to colorize whitespace errors
Rather than replicating the colorization logic of "git diff-files" we rely on "git diff-files" itself. This guarantees consistent colorization in and outside "git add -i". Seeing as speed is not a concern here (the bottleneck is how fast the user can read, not how fast "git diff-files" runs) we do this by actually running it twice, once without color and once with. In this way as the whitespace colorization provided by "git diff-files" evolves (per-path attributes, new classes of whitespace error), "git add -i" will automatically benefit from it and stay in synch. Also, by working with two sets of diff output (an uncolorized one for internal processing and a colorized one for display only) we minimize the risk of regressions because the changes required to implement this are minimally invasive. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-checkout.sh')
0 files changed, 0 insertions, 0 deletions