Merge branch 'tk/diffcore-delta-remove-unused' into maint
authorJunio C Hamano <gitster@pobox.com>
Tue, 29 Nov 2016 21:28:03 +0000 (13:28 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 29 Nov 2016 21:28:03 +0000 (13:28 -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 fe6f59160fd70a6dc801d3a67c61484dda521fb1..8c78fce49dc5fa9e1215eb3bdb88e1f5e7f9d2c6 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -1954,7 +1954,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 4159748a70ccc0ddee7cf2fcf82976629dfa6867..e2db85abd9f04d5e3a7a71ad396921cf9f2908b6 100644 (file)
@@ -169,7 +169,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 73d003a08ae72d0c8f18b16172bc09c86022eb8f..15c014d864c65e2a6dd17523bacf1681a276db01 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);