author | Jeff King <peff@peff.net> | |
Thu, 18 Aug 2011 05:03:12 +0000 (22:03 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 18 Aug 2011 21:35:53 +0000 (14:35 -0700) | ||
commit | f1c9626105d5e4962a5ccaa4620114d03f32ad02 | |
tree | d777e2316283c1972844977c821091dd77fd6262 | tree | snapshot |
parent | 2e6c012e10fd866eb3259de3a929e0296daabbaf | commit | diff |
diff: refactor COLOR_DIFF from a flag into an int
This lets us store more than just a bit flag for whether we
want color; we can also store whether we want automatic
colors. This can be useful for making the automatic-color
decision closer to the point of use.
This mostly just involves replacing DIFF_OPT_* calls with
manipulations of the flag. The biggest exception is that
calls to DIFF_OPT_TST must check for "o->use_color > 0",
which lets an "unknown" value (i.e., the default) stay at
"no color". In the previous code, a value of "-1" was not
propagated at all.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This lets us store more than just a bit flag for whether we
want color; we can also store whether we want automatic
colors. This can be useful for making the automatic-color
decision closer to the point of use.
This mostly just involves replacing DIFF_OPT_* calls with
manipulations of the flag. The biggest exception is that
calls to DIFF_OPT_TST must check for "o->use_color > 0",
which lets an "unknown" value (i.e., the default) stay at
"no color". In the previous code, a value of "-1" was not
propagated at all.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge.c | diff | blob | history | |
combine-diff.c | diff | blob | history | |
diff.c | diff | blob | history | |
diff.h | diff | blob | history | |
graph.c | diff | blob | history | |
log-tree.c | diff | blob | history | |
wt-status.c | diff | blob | history |