From: Jeff King Date: Sat, 1 Mar 2008 06:14:31 +0000 (-0500) Subject: rename: warn user when we have turned off rename detection X-Git-Tag: v1.5.5-rc0~108 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ee542ee3fc309fa95622b274c09eefbe394cd108;p=git.git rename: warn user when we have turned off rename detection Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/diffcore-rename.c b/diffcore-rename.c index 3d377251b..31941bcbb 100644 --- a/diffcore-rename.c +++ b/diffcore-rename.c @@ -468,10 +468,11 @@ void diffcore_rename(struct diff_options *options) */ if (rename_limit <= 0 || rename_limit > 32767) rename_limit = 32767; - if (num_create > rename_limit && num_src > rename_limit) - goto cleanup; - if (num_create * num_src > rename_limit * rename_limit) + if ((num_create > rename_limit && num_src > rename_limit) || + (num_create * num_src > rename_limit * rename_limit)) { + warning("too many files, skipping inexact rename detection"); goto cleanup; + } mx = xmalloc(sizeof(*mx) * num_create * num_src); for (dst_cnt = i = 0; i < rename_dst_nr; i++) {