]> git.neil.brown.name Git - git.git/commitdiff
diffcore-delta: remove unused parameter to diffcore_count_changes()
authorTobias Klauser <tklauser@distanz.ch>
Mon, 14 Nov 2016 13:39:05 +0000 (14:39 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 14 Nov 2016 17:24:04 +0000 (09:24 -0800)
The delta_limit parameter to diffcore_count_changes() has been unused
since commit ba23bbc8e ("diffcore-delta: make change counter to byte
oriented again.", 2006-03-04).

Remove the parameter and adjust all callers.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
diffcore-break.c
diffcore-delta.c
diffcore-rename.c
diffcore.h

diff --git a/diff.c b/diff.c
index 059123c5dcef4129763895b0f2ad5a54728b0c07..bbb8977539ed4986084b845f5f1a0549dafa9ef7 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -1953,7 +1953,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 5473493e10551633659d0727626ffc2273ef4f73..904156d92ed6796bf277dda0be17fe20b580ccf4 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 7f03eb5a0404d4b44f292fba76433dfec74dcd44..8ce3b7d661d356955eee8c179850c2d933fd9694 100644 (file)
@@ -144,7 +144,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
@@ -190,11 +189,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 33ea2de348803b29a08a6713ae4cab1345f874d9..8a9c9d781a835e2412d0d30fb384062b4dd48a59 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);