diff options
-rw-r--r-- | builtin-diff-files.c | 2 | ||||
-rw-r--r-- | builtin-diff-index.c | 2 | ||||
-rw-r--r-- | builtin-diff-tree.c | 2 | ||||
-rw-r--r-- | diff.c | 6 | ||||
-rw-r--r-- | diff.h | 1 |
5 files changed, 10 insertions, 3 deletions
diff --git a/builtin-diff-files.c b/builtin-diff-files.c index 9c04111656..4abe3c28fb 100644 --- a/builtin-diff-files.c +++ b/builtin-diff-files.c @@ -21,7 +21,7 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix) prefix = setup_git_directory_gently(&nongit); init_revisions(&rev, prefix); - git_config(git_default_config); /* no "diff" UI options */ + git_config(git_diff_basic_config); /* no "diff" UI options */ rev.abbrev = 0; if (!setup_diff_no_index(&rev, argc, argv, nongit, prefix)) diff --git a/builtin-diff-index.c b/builtin-diff-index.c index 0f2390a20a..2b955deb91 100644 --- a/builtin-diff-index.c +++ b/builtin-diff-index.c @@ -17,7 +17,7 @@ int cmd_diff_index(int argc, const char **argv, const char *prefix) int result; init_revisions(&rev, prefix); - git_config(git_default_config); /* no "diff" UI options */ + git_config(git_diff_basic_config); /* no "diff" UI options */ rev.abbrev = 0; argc = setup_revisions(argc, argv, &rev, NULL); diff --git a/builtin-diff-tree.c b/builtin-diff-tree.c index ebc50efbd2..832797ff3b 100644 --- a/builtin-diff-tree.c +++ b/builtin-diff-tree.c @@ -68,7 +68,7 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix) int read_stdin = 0; init_revisions(opt, prefix); - git_config(git_default_config); /* no "diff" UI options */ + git_config(git_diff_basic_config); /* no "diff" UI options */ nr_sha1 = 0; opt->abbrev = 0; opt->diff = 1; @@ -178,6 +178,12 @@ int git_diff_ui_config(const char *var, const char *value) return parse_funcname_pattern(var, ep, value); } } + + return git_diff_basic_config(var, value); +} + +int git_diff_basic_config(const char *var, const char *value) +{ if (!prefixcmp(var, "diff.color.") || !prefixcmp(var, "color.diff.")) { int slot = parse_diff_color_slot(var, 11); color_parse(value, var, diff_colors[slot]); @@ -172,6 +172,7 @@ extern void diff_unmerge(struct diff_options *, #define DIFF_SETUP_USE_CACHE 2 #define DIFF_SETUP_USE_SIZE_CACHE 4 +extern int git_diff_basic_config(const char *var, const char *value); extern int git_diff_ui_config(const char *var, const char *value); extern void diff_setup(struct diff_options *); extern int diff_opt_parse(struct diff_options *, const char **, int); |