summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-diff-files.c2
-rw-r--r--builtin-diff-index.c2
-rw-r--r--builtin-diff-stages.c2
-rw-r--r--builtin-diff-tree.c2
-rw-r--r--builtin-diff.c2
-rw-r--r--builtin-log.c8
-rw-r--r--diff.c8
-rw-r--r--diff.h2
8 files changed, 17 insertions, 11 deletions
diff --git a/builtin-diff-files.c b/builtin-diff-files.c
index a655eea91e..81ac2fe64a 100644
--- a/builtin-diff-files.c
+++ b/builtin-diff-files.c
@@ -18,7 +18,7 @@ int cmd_diff_files(int argc, const char **argv, char **envp)
struct rev_info rev;
int silent = 0;
- git_config(git_diff_config);
+ git_config(git_default_config); /* no "diff" UI options */
init_revisions(&rev);
rev.abbrev = 0;
diff --git a/builtin-diff-index.c b/builtin-diff-index.c
index b37c9e8ccb..a1fa1b85cf 100644
--- a/builtin-diff-index.c
+++ b/builtin-diff-index.c
@@ -15,7 +15,7 @@ int cmd_diff_index(int argc, const char **argv, char **envp)
int cached = 0;
int i;
- git_config(git_diff_config);
+ git_config(git_default_config); /* no "diff" UI options */
init_revisions(&rev);
rev.abbrev = 0;
diff --git a/builtin-diff-stages.c b/builtin-diff-stages.c
index 30931fe049..9c62702941 100644
--- a/builtin-diff-stages.c
+++ b/builtin-diff-stages.c
@@ -61,7 +61,7 @@ int cmd_diff_stages(int ac, const char **av, char **envp)
const char *prefix = setup_git_directory();
const char **pathspec = NULL;
- git_config(git_diff_config);
+ git_config(git_default_config); /* no "diff" UI options */
read_cache();
diff_setup(&diff_options);
while (1 < ac && av[1][0] == '-') {
diff --git a/builtin-diff-tree.c b/builtin-diff-tree.c
index ae1cde9d00..b610668594 100644
--- a/builtin-diff-tree.c
+++ b/builtin-diff-tree.c
@@ -67,7 +67,7 @@ int cmd_diff_tree(int argc, const char **argv, char **envp)
static struct rev_info *opt = &log_tree_opt;
int read_stdin = 0;
- git_config(git_diff_config);
+ git_config(git_default_config); /* no "diff" UI options */
nr_sha1 = 0;
init_revisions(opt);
opt->abbrev = 0;
diff --git a/builtin-diff.c b/builtin-diff.c
index d520c7ca29..1df531ba28 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -250,7 +250,7 @@ int cmd_diff(int argc, const char **argv, char **envp)
* Other cases are errors.
*/
- git_config(git_diff_config);
+ git_config(git_diff_ui_config);
init_revisions(&rev);
argc = setup_revisions(argc, argv, &rev, NULL);
diff --git a/builtin-log.c b/builtin-log.c
index 698b71ecc8..dd5a5a2b14 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -47,7 +47,7 @@ int cmd_whatchanged(int argc, const char **argv, char **envp)
{
struct rev_info rev;
- git_config(git_diff_config);
+ git_config(git_diff_ui_config);
init_revisions(&rev);
rev.diff = 1;
rev.diffopt.recursive = 1;
@@ -62,7 +62,7 @@ int cmd_show(int argc, const char **argv, char **envp)
{
struct rev_info rev;
- git_config(git_diff_config);
+ git_config(git_diff_ui_config);
init_revisions(&rev);
rev.diff = 1;
rev.diffopt.recursive = 1;
@@ -79,7 +79,7 @@ int cmd_log(int argc, const char **argv, char **envp)
{
struct rev_info rev;
- git_config(git_diff_config);
+ git_config(git_diff_ui_config);
init_revisions(&rev);
rev.always_show_header = 1;
cmd_log_init(argc, argv, envp, &rev);
@@ -105,7 +105,7 @@ static int git_format_config(const char *var, const char *value)
strcat(extra_headers, value);
return 0;
}
- return git_diff_config(var, value);
+ return git_diff_ui_config(var, value);
}
diff --git a/diff.c b/diff.c
index 1bf1ed0967..493650cc0e 100644
--- a/diff.c
+++ b/diff.c
@@ -102,7 +102,13 @@ static const char *parse_diff_color_value(const char *value, const char *var)
die("bad config value '%s' for variable '%s'", value, var);
}
-int git_diff_config(const char *var, const char *value)
+/*
+ * These are to give UI layer defaults.
+ * The core-level commands such as git-diff-files should
+ * never be affected by the setting of diff.renames
+ * the user happens to have in the configuration file.
+ */
+int git_diff_ui_config(const char *var, const char *value)
{
if (!strcmp(var, "diff.renamelimit")) {
diff_rename_limit_default = git_config_int(var, value);
diff --git a/diff.h b/diff.h
index 8ab0448a12..a06f959938 100644
--- a/diff.h
+++ b/diff.h
@@ -123,7 +123,7 @@ extern int diff_scoreopt_parse(const char *opt);
#define DIFF_SETUP_USE_CACHE 2
#define DIFF_SETUP_USE_SIZE_CACHE 4
-extern int git_diff_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);
extern int diff_setup_done(struct diff_options *);