From 3299c6f6a8a384453d025ffa117c5d8b35ba1972 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 15 Nov 2005 12:48:08 -0800 Subject: diff: make default rename detection limit configurable. A while ago, a rename-detection limit logic was implemented as a response to this thread: http://marc.theaimsgroup.com/?l=git&m=112413080630175 where gitweb was found to be using a lot of time and memory to detect renames on huge commits. git-diff family takes -l flag, and if the number of paths that are rename destination candidates (i.e. new paths with -M, or modified paths with -C) are larger than that number, skips rename/copy detection even when -M or -C is specified on the command line. This commit makes the rename detection limit easier to use. You can have: [diff] renamelimit = 30 in your .git/config file to specify the default rename detection limit. You can override this from the command line; giving 0 means 'unlimited': git diff -M -l0 We might want to change the default behaviour, when you do not have the configuration, to limit it to say 20 paths or so. This would also help the diffstat generation after a big 'git pull'. Signed-off-by: Junio C Hamano --- cache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index 9a6bfb96d..08461cfc5 100644 --- a/cache.h +++ b/cache.h @@ -180,6 +180,7 @@ extern void rollback_index_file(struct cache_file *); extern int trust_executable_bit; extern int only_use_symrefs; +extern int diff_rename_limit_default; #define MTIME_CHANGED 0x0001 #define CTIME_CHANGED 0x0002 -- cgit v1.2.1