git-mv: succeed even if source is a prefix of destination
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index 895c1376559cc2aaa1e6c25361a9a6b831c9a18a..b3b1781a9cac05457e42691970c93b6e1501f68c 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -1515,10 +1515,8 @@ void diff_setup(struct diff_options *options)
 
 int diff_setup_done(struct diff_options *options)
 {
-       if ((options->find_copies_harder &&
-            options->detect_rename != DIFF_DETECT_COPY) ||
-           (0 <= options->rename_limit && !options->detect_rename))
-               return -1;
+       if (options->find_copies_harder)
+               options->detect_rename = DIFF_DETECT_COPY;
 
        if (options->output_format & (DIFF_FORMAT_NAME |
                                      DIFF_FORMAT_NAME_STATUS |