diff: pass the whole diff_options to diffcore_apply_filter()

The --diff-filter=<arg> option given by the user is kept as a string, and passed to the underlying diffcore_apply_filter() function as a string for each resulting path we run number of strchr() to see if each class of change among ACDMRTXUB is meant to be given. Change the function signature to pass the whole diff_options, so that we can pre-parse this string in the next patch. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Jul 17, 2013 at 14:19 UTC 949226fe77beb1027bd5ac7be56fe002236d6cad
1 file changed +4 -2
diff.c
+4 -2
@@ -4509,11 +4509,13 @@ free_queue:
4509 }
4510 }
4511
4512 -static void diffcore_apply_filter(const char *filter)
4512 +static void diffcore_apply_filter(struct diff_options *options)
4513 {
4514 int i;
4515 struct diff_queue_struct *q = &diff_queued_diff;
4516 struct diff_queue_struct outq;
4517 + const char *filter = options->filter;
4518 +
4519 DIFF_QUEUE_CLEAR(&outq);
4520
4521 if (!filter)
@@ -4661,7 +4663,7 @@ void diffcore_std(struct diff_options *options)
4663 if (!options->found_follow)
4664 /* See try_to_follow_renames() in tree-diff.c */
4665 diff_resolve_rename_copy();
4664 - diffcore_apply_filter(options->filter);
4666 + diffcore_apply_filter(options);
4667
4668 if (diff_queued_diff.nr && !DIFF_OPT_TST(options, DIFF_FROM_CONTENTS))
4669 DIFF_OPT_SET(options, HAS_CHANGES);