summaryrefslogtreecommitdiff
path: root/userdiff.h
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2011-08-17 22:04:56 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-08-19 15:51:37 -0700
commitc659f55b31bb928688afd4ddfd94f8bea978ff1a (patch)
treec8f39adb88e6802bbb8a93f8e38581e489a2a080 /userdiff.h
parentcolor: delay auto-color decision until point of use (diff)
downloadtgif-c659f55b31bb928688afd4ddfd94f8bea978ff1a.tar.xz
config: refactor get_colorbool function
For "git config --get-colorbool color.foo", we use a custom callback that looks not only for the key that the user gave us, but also for "diff.color" (for backwards compatibility) and "color.ui" (as a fallback). For the former, we use a custom variable to store the diff.color value. For the latter, though, we store it in the main "git_use_color_default" variable, turning on color.ui for any other parts of git that respect this value. In practice, this doesn't cause any bugs, because git-config runs without caring about git_use_color_default, and then exits. But it crosses module boundaries in an unusual and confusing way, and it makes refactoring color handling harder than it needs to be. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'userdiff.h')
0 files changed, 0 insertions, 0 deletions