Browse Source

Merge branch 'tk/diffcore-delta-remove-unused'

Code cleanup.

* tk/diffcore-delta-remove-unused:
  diffcore-delta: remove unused parameter to diffcore_count_changes()
maint
Junio C Hamano 8 years ago
parent
commit
6d40812e4b
  1. 2
      diff.c
  2. 1
      diffcore-break.c
  3. 1
      diffcore-delta.c
  4. 4
      diffcore-rename.c
  5. 1
      diffcore.h

2
diff.c

@ -2023,7 +2023,7 @@ static void show_dirstat(struct diff_options *options) @@ -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);

1
diffcore-break.c

@ -73,7 +73,6 @@ static int should_break(struct diff_filespec *src, @@ -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;


1
diffcore-delta.c

@ -166,7 +166,6 @@ int diffcore_count_changes(struct diff_filespec *src, @@ -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)
{

4
diffcore-rename.c

@ -145,7 +145,6 @@ static int estimate_similarity(struct diff_filespec *src, @@ -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, @@ -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;


1
diffcore.h

@ -142,7 +142,6 @@ extern int diffcore_count_changes(struct diff_filespec *src, @@ -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);


Loading…
Cancel
Save