summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-08-28 21:19:16 -0700
committerJunio C Hamano <gitster@pobox.com>2011-08-28 21:19:16 -0700
commitf946b465d7fa13a235dd5653d37c7babb1ceb233 (patch)
treed3a1aa2e6f0779e5440cec0815f0d59d9e31b4d4 /diff.h
parente5cfcb04e0acc5f3b51e6d69487028315b33e4c9 (diff)
parentc9bfb953489e559d513c1627150aa16f8d42d6c5 (diff)
downloadgit-f946b465d7fa13a235dd5653d37c7babb1ceb233.tar.gz
Merge branch 'jk/color-and-pager'
* jk/color-and-pager: want_color: automatically fallback to color.ui diff: don't load color config in plumbing config: refactor get_colorbool function color: delay auto-color decision until point of use git_config_colorbool: refactor stdout_is_tty handling diff: refactor COLOR_DIFF from a flag into an int setup_pager: set GIT_PAGER_IN_USE t7006: use test_config helpers test-lib: add helper functions for config t7006: modernize calls to unset Conflicts: builtin/commit.c parse-options.c
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/diff.h b/diff.h
index b920a20f80..8c66b59517 100644
--- a/diff.h
+++ b/diff.h
@@ -58,7 +58,7 @@ typedef struct strbuf *(*diff_prefix_fn_t)(struct diff_options *opt, void *data)
#define DIFF_OPT_SILENT_ON_REMOVE (1 << 5)
#define DIFF_OPT_FIND_COPIES_HARDER (1 << 6)
#define DIFF_OPT_FOLLOW_RENAMES (1 << 7)
-#define DIFF_OPT_COLOR_DIFF (1 << 8)
+/* (1 << 8) unused */
/* (1 << 9) unused */
#define DIFF_OPT_HAS_CHANGES (1 << 10)
#define DIFF_OPT_QUICK (1 << 11)
@@ -101,6 +101,7 @@ struct diff_options {
const char *single_follow;
const char *a_prefix, *b_prefix;
unsigned flags;
+ int use_color;
int context;
int interhunkcontext;
int break_opt;
@@ -160,7 +161,7 @@ enum color_diff {
};
const char *diff_get_color(int diff_use_color, enum color_diff ix);
#define diff_get_color_opt(o, ix) \
- diff_get_color(DIFF_OPT_TST((o), COLOR_DIFF), ix)
+ diff_get_color((o)->use_color, ix)
extern const char mime_boundary_leader[];