summaryrefslogtreecommitdiff
path: root/diffcore-rename.c
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2021-07-15 00:45:23 +0000
committerJunio C Hamano <gitster@pobox.com>2021-07-15 16:54:24 -0700
commit9dd29dbef01e39fe9df81ad9e5e193128d8c5ad5 (patch)
tree720a05e253247769db392f180d9f6442ffa022ad /diffcore-rename.c
parent6623a528e00b73f5438724a355c43343d3de8652 (diff)
downloadgit-9dd29dbef01e39fe9df81ad9e5e193128d8c5ad5.tar.gz
diffcore-rename: treat a rename_limit of 0 as unlimited
In commit 89973554b52c (diffcore-rename: make diff-tree -l0 mean -l<large>, 2017-11-29), -l0 was given a special magical "large" value, but one which was not large enough for some uses (as can be seen from commit 9f7e4bfa3b6d (diff: remove silent clamp of renameLimit, 2017-11-13). Make 0 (or a negative value) be treated as unlimited instead and update the documentation to mention this. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diffcore-rename.c')
-rw-r--r--diffcore-rename.c2
1 files changed, 1 insertions, 1 deletions
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;