diff options
-rw-r--r-- | Documentation/diff-options.txt | 1 | ||||
-rw-r--r-- | diffcore-rename.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt index 58acfff928..0aebe83205 100644 --- a/Documentation/diff-options.txt +++ b/Documentation/diff-options.txt @@ -598,6 +598,7 @@ of a delete/create pair. prevents the exhaustive portion of rename/copy detection from running if the number of source/destination files involved exceeds the specified number. Defaults to diff.renameLimit. + Note that a value of 0 is treated as unlimited. ifndef::git-format-patch[] --diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]]:: diff --git a/diffcore-rename.c b/diffcore-rename.c index 3375e24659..513ba7b05f 100644 --- a/diffcore-rename.c +++ b/diffcore-rename.c @@ -1021,7 +1021,7 @@ static int too_many_rename_candidates(int num_destinations, int num_sources, * memory for the matrix anyway. */ if (rename_limit <= 0) - rename_limit = 32767; + return 0; /* treat as unlimited */ if (st_mult(num_destinations, num_sources) <= st_mult(rename_limit, rename_limit)) return 0; |