diffcore-delta: remove unused parameter to diffcore_count_changes()
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>
Tobias Klauser committed
Nov 14, 2016 at 14:39 UTC
974e0044d65dc22e8137e93b8ea13aec23d3a5a3
5 files changed
+1
-8
diff.c
+1
-1
@@ -1953,7 +1953,7 @@ static void show_dirstat(struct diff_options *options)
1953
if (DIFF_FILE_VALID(p->one) && DIFF_FILE_VALID(p->two)) {
1954
diff_populate_filespec(p->one, 0);
1955
diff_populate_filespec(p->two, 0);
1956
- diffcore_count_changes(p->one, p->two, NULL, NULL, 0,
1956
+ diffcore_count_changes(p->one, p->two, NULL, NULL,
1957
&copied, &added);
1958
diff_free_filespec_data(p->one);
1959
diff_free_filespec_data(p->two);
diffcore-break.c
-1
@@ -73,7 +73,6 @@ static int should_break(struct diff_filespec *src,
73
74
if (diffcore_count_changes(src, dst,
75
&src->cnt_data, &dst->cnt_data,
76
- 0,
76
&src_copied, &literal_added))
77
return 0;
78
diffcore-delta.c
-1
@@ -169,7 +169,6 @@ int diffcore_count_changes(struct diff_filespec *src,
169
struct diff_filespec *dst,
170
void **src_count_p,
171
void **dst_count_p,
172
- unsigned long delta_limit,
172
unsigned long *src_copied,
173
unsigned long *literal_added)
174
{
diffcore-rename.c
-4
@@ -144,7 +144,6 @@ static int estimate_similarity(struct diff_filespec *src,
144
* call into this function in that case.
145
*/
146
unsigned long max_size, delta_size, base_size, src_copied, literal_added;
147
- unsigned long delta_limit;
147
int score;
148
149
/* We deal only with regular files. Symlink renames are handled
@@ -190,11 +189,8 @@ static int estimate_similarity(struct diff_filespec *src,
189
if (!dst->cnt_data && diff_populate_filespec(dst, 0))
190
return 0;
191
193
- delta_limit = (unsigned long)
194
- (base_size * (MAX_SCORE-minimum_score) / MAX_SCORE);
192
if (diffcore_count_changes(src, dst,
193
&src->cnt_data, &dst->cnt_data,
197
- delta_limit,
194
&src_copied, &literal_added))
195
return 0;
196
diffcore.h
-1
@@ -142,7 +142,6 @@ extern int diffcore_count_changes(struct diff_filespec *src,
142
struct diff_filespec *dst,
143
void **src_count_p,
144
void **dst_count_p,
145
- unsigned long delta_limit,
145
unsigned long *src_copied,
146
unsigned long *literal_added);
147