diff: drop options parameter from diffcore_fix_diff_index()

The sole purpose of this function is to fix the sorting order of the
queued diff entries. It doesn't need to know about any diff options, so
we can drop the unused parameter.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2019-02-14 00:48:03 -05:00 коммит произвёл Junio C Hamano
Родитель 2d08f3deb9
Коммит 784c0daed5
3 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -531,7 +531,7 @@ int run_diff_index(struct rev_info *revs, int cached)
exit(128);
diff_set_mnemonic_prefix(&revs->diffopt, "c/", cached ? "i/" : "w/");
diffcore_fix_diff_index(&revs->diffopt);
diffcore_fix_diff_index();
diffcore_std(&revs->diffopt);
diff_flush(&revs->diffopt);
trace_performance_leave("diff-index");

2
diff.c
Просмотреть файл

@ -6224,7 +6224,7 @@ static int diffnamecmp(const void *a_, const void *b_)
return strcmp(name_a, name_b);
}
void diffcore_fix_diff_index(struct diff_options *options)
void diffcore_fix_diff_index(void)
{
struct diff_queue_struct *q = &diff_queued_diff;
QSORT(q->queue, q->nr, diffnamecmp);

2
diff.h
Просмотреть файл

@ -367,7 +367,7 @@ int git_config_rename(const char *var, const char *value);
#define DIFF_PICKAXE_IGNORE_CASE 32
void diffcore_std(struct diff_options *);
void diffcore_fix_diff_index(struct diff_options *);
void diffcore_fix_diff_index(void);
#define COMMON_DIFF_OPTIONS_HELP \
"\ncommon diff options:\n" \