Merge branch 'tk/diffcore-delta-remove-unused'
authorJunio C Hamano <gitster@pobox.com>
Thu, 17 Nov 2016 21:45:22 +0000 (13:45 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Nov 2016 21:45:22 +0000 (13:45 -0800)
Code cleanup.

* tk/diffcore-delta-remove-unused:
diffcore-delta: remove unused parameter to diffcore_count_changes()

diff.c
diffcore-break.c
diffcore-delta.c
diffcore-rename.c
diffcore.h
diff --git a/diff.c b/diff.c
index 8981477c436dd11d97714f0ad7e1b9363e328798..ec8728362dae5a3bf404f6782f9091d6a1c9a6c2 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -2023,7 +2023,7 @@ static void show_dirstat(struct diff_options *options)
                if (DIFF_FILE_VALID(p->one) && DIFF_FILE_VALID(p->two)) {
                        diff_populate_filespec(p->one, 0);
                        diff_populate_filespec(p->two, 0);
-                       diffcore_count_changes(p->one, p->two, NULL, NULL, 0,
+                       diffcore_count_changes(p->one, p->two, NULL, NULL,
                                               &copied, &added);
                        diff_free_filespec_data(p->one);
                        diff_free_filespec_data(p->two);
index 881a74f29e4f6033a2547f2558a5ad8a3eaad584..c64359f489c87910b9d41756918dacda49276004 100644 (file)
@@ -73,7 +73,6 @@ static int should_break(struct diff_filespec *src,
 
        if (diffcore_count_changes(src, dst,
                                   &src->cnt_data, &dst->cnt_data,
-                                  0,
                                   &src_copied, &literal_added))
                return 0;
 
index 2ebedb32d18abb3e50d8b4e4b523cf2f8205a695..ebe70fb068519be86437a11b980d804be0534c75 100644 (file)
@@ -166,7 +166,6 @@ int diffcore_count_changes(struct diff_filespec *src,
                           struct diff_filespec *dst,
                           void **src_count_p,
                           void **dst_count_p,
-                          unsigned long delta_limit,
                           unsigned long *src_copied,
                           unsigned long *literal_added)
 {
index 54a2396653df230d8f527d2eac5a2f75398f0b13..f7444c86bde3909c8fca23f71c4852514eb26b88 100644 (file)
@@ -145,7 +145,6 @@ static int estimate_similarity(struct diff_filespec *src,
         * call into this function in that case.
         */
        unsigned long max_size, delta_size, base_size, src_copied, literal_added;
-       unsigned long delta_limit;
        int score;
 
        /* We deal only with regular files.  Symlink renames are handled
@@ -191,11 +190,8 @@ static int estimate_similarity(struct diff_filespec *src,
        if (!dst->cnt_data && diff_populate_filespec(dst, 0))
                return 0;
 
-       delta_limit = (unsigned long)
-               (base_size * (MAX_SCORE-minimum_score) / MAX_SCORE);
        if (diffcore_count_changes(src, dst,
                                   &src->cnt_data, &dst->cnt_data,
-                                  delta_limit,
                                   &src_copied, &literal_added))
                return 0;
 
index c11b8465fc8ef9e54f12130e490c00bd2fb63616..623024135478088028cd42b8c6a744ebb04bf0a7 100644 (file)
@@ -142,7 +142,6 @@ extern int diffcore_count_changes(struct diff_filespec *src,
                                  struct diff_filespec *dst,
                                  void **src_count_p,
                                  void **dst_count_p,
-                                 unsigned long delta_limit,
                                  unsigned long *src_copied,
                                  unsigned long *literal_added);