Skip to content

Commit 2b6ca6d

Browse files
torvaldsgitster
authored andcommitted
diff.renamelimit is a basic diff configuration
The configuration was added as a core option in 3299c6f (diff: make default rename detection limit configurable., 2005-11-15), but 9ce392f (Move diff.renamelimit out of default configuration., 2005-11-21) separated diff-related stuff out of the core. Up to that point it was Ok. When we separated the Porcelain options out of the git_diff_config in 83ad63c (diff: do not use configuration magic at the core-level, 2006-07-08), we should have been more careful. This mistake made diff-tree plumbing and git-show Porcelain to notice different set of renames when the user explicitly asked for rename detection. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3be3999 commit 2b6ca6d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

diff.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,6 @@ static int parse_funcname_pattern(const char *var, const char *ep, const char *v
131131
*/
132132
int git_diff_ui_config(const char *var, const char *value, void *cb)
133133
{
134-
if (!strcmp(var, "diff.renamelimit")) {
135-
diff_rename_limit_default = git_config_int(var, value);
136-
return 0;
137-
}
138134
if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff")) {
139135
diff_use_color_default = git_config_colorbool(var, value, -1);
140136
return 0;
@@ -167,6 +163,11 @@ int git_diff_ui_config(const char *var, const char *value, void *cb)
167163

168164
int git_diff_basic_config(const char *var, const char *value, void *cb)
169165
{
166+
if (!strcmp(var, "diff.renamelimit")) {
167+
diff_rename_limit_default = git_config_int(var, value);
168+
return 0;
169+
}
170+
170171
if (!prefixcmp(var, "diff.color.") || !prefixcmp(var, "color.diff.")) {
171172
int slot = parse_diff_color_slot(var, 11);
172173
if (!value)

0 commit comments

Comments
 (0)