pickaxe: give diff_grep the same signature as has_changes
Change diff_grep() to match the signature of has_changes() as a preparation for the next patch that will use function pointers to the two. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe committed
Oct 6, 2011 at 18:50 UTC
db99cb700098942d3fced9e5d8ec873aabe6e1ef
1 file changed
+4
-3
diffcore-pickaxe.c
+4
-3
@@ -45,7 +45,8 @@ static void fill_one(struct diff_filespec *one,
45
}
46
}
47
48
-static int diff_grep(struct diff_filepair *p, regex_t *regexp, struct diff_options *o)
48
+static int diff_grep(struct diff_filepair *p, struct diff_options *o,
49
+ regex_t *regexp, kwset_t kws)
50
{
51
regmatch_t regmatch;
52
struct userdiff_driver *textconv_one = NULL;
@@ -114,7 +115,7 @@ static void diffcore_pickaxe_grep(struct diff_options *o)
115
/* Showing the whole changeset if needle exists */
116
for (i = 0; i < q->nr; i++) {
117
struct diff_filepair *p = q->queue[i];
117
- if (diff_grep(p, ®ex, o))
118
+ if (diff_grep(p, o, ®ex, NULL))
119
goto out; /* do not munge the queue */
120
}
121
@@ -129,7 +130,7 @@ static void diffcore_pickaxe_grep(struct diff_options *o)
130
/* Showing only the filepairs that has the needle */
131
for (i = 0; i < q->nr; i++) {
132
struct diff_filepair *p = q->queue[i];
132
- if (diff_grep(p, ®ex, o))
133
+ if (diff_grep(p, o, ®ex, NULL))
134
diff_q(&outq, p);
135
else
136
diff_free_filepair(p);