diff: drop options parameter from diffcore_fix_diff_index()
authorJeff King <peff@peff.net>
Thu, 14 Feb 2019 05:48:03 +0000 (00:48 -0500)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Feb 2019 23:26:14 +0000 (15:26 -0800)
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>
diff-lib.c
diff.c
diff.h
index 23c8d351b3aa5912c49c9da0eecd8727cf06ac72..a838c219ec044b9fb78b4bda058d078e66d7aaf8 100644 (file)
@@ -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");
diff --git a/diff.c b/diff.c
index 5306c48652db59e84c26383d68cf4a7d896647d4..3e7d11fb704fee54057f069bc6ac63c5b356bca5 100644 (file)
--- a/diff.c
+++ b/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);
diff --git a/diff.h b/diff.h
index b512d0477ac3a4a0338094a4d3b21770ecb57dd8..8f55aad5ba14c9b89a231b6dea242f404166c33a 100644 (file)
--- a/diff.h
+++ b/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" \