Skip to content

Commit db99cb7

Browse files
René Scharfegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5d176fb commit db99cb7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

diffcore-pickaxe.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ static void fill_one(struct diff_filespec *one,
4545
}
4646
}
4747

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)
4950
{
5051
regmatch_t regmatch;
5152
struct userdiff_driver *textconv_one = NULL;
@@ -114,7 +115,7 @@ static void diffcore_pickaxe_grep(struct diff_options *o)
114115
/* Showing the whole changeset if needle exists */
115116
for (i = 0; i < q->nr; i++) {
116117
struct diff_filepair *p = q->queue[i];
117-
if (diff_grep(p, &regex, o))
118+
if (diff_grep(p, o, &regex, NULL))
118119
goto out; /* do not munge the queue */
119120
}
120121

@@ -129,7 +130,7 @@ static void diffcore_pickaxe_grep(struct diff_options *o)
129130
/* Showing only the filepairs that has the needle */
130131
for (i = 0; i < q->nr; i++) {
131132
struct diff_filepair *p = q->queue[i];
132-
if (diff_grep(p, &regex, o))
133+
if (diff_grep(p, o, &regex, NULL))
133134
diff_q(&outq, p);
134135
else
135136
diff_free_filepair(p);

0 commit comments

Comments
 (0)