tree-diff: no need to pass match to skip_uninteresting()

It is neither used there as input, nor the output written through it, is used outside. Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Kirill Smelkov committed Feb 3, 2014 at 16:47 UTC e906612121bc9d436a3a64cd03be0537654e800c
1 file changed +8 -9
tree-diff.c
+8 -9
@@ -109,13 +109,14 @@ static void show_entry(struct diff_options *opt, const char *prefix,
109 }
110
111 static void skip_uninteresting(struct tree_desc *t, struct strbuf *base,
112 - struct diff_options *opt,
113 - enum interesting *match)
112 + struct diff_options *opt)
113 {
114 + enum interesting match;
115 +
116 while (t->size) {
116 - *match = tree_entry_interesting(&t->entry, base, 0, &opt->pathspec);
117 - if (*match) {
118 - if (*match == all_entries_not_interesting)
117 + match = tree_entry_interesting(&t->entry, base, 0, &opt->pathspec);
118 + if (match) {
119 + if (match == all_entries_not_interesting)
120 t->size = 0;
121 break;
122 }
@@ -128,8 +129,6 @@ int diff_tree(struct tree_desc *t1, struct tree_desc *t2,
129 {
130 struct strbuf base;
131 int baselen = strlen(base_str);
131 - enum interesting t1_match = entry_not_interesting;
132 - enum interesting t2_match = entry_not_interesting;
132
133 /* Enable recursion indefinitely */
134 opt->pathspec.recursive = DIFF_OPT_TST(opt, RECURSIVE);
@@ -141,8 +140,8 @@ int diff_tree(struct tree_desc *t1, struct tree_desc *t2,
140 if (diff_can_quit_early(opt))
141 break;
142 if (opt->pathspec.nr) {
144 - skip_uninteresting(t1, &base, opt, &t1_match);
145 - skip_uninteresting(t2, &base, opt, &t2_match);
143 + skip_uninteresting(t1, &base, opt);
144 + skip_uninteresting(t2, &base, opt);
145 }
146 if (!t1->size) {
147 if (!t2->size)