if (!mf2.ptr)
return 0; /* ignore unmerged */
/* created "two" -- does it have what we are looking for? */
- hit = !regexec(regexp, p->two->data, 1, ®match, 0);
+ hit = !regexec(regexp, mf2.ptr, 1, ®match, 0);
} else if (!mf2.ptr) {
/* removed "one" -- did it have what we are looking for? */
- hit = !regexec(regexp, p->one->data, 1, ®match, 0);
+ hit = !regexec(regexp, mf1.ptr, 1, ®match, 0);
} else {
/*
* We have both sides; need to run textual diff and see if
unsigned int cnt;
unsigned long sz;
const char *data;
- if (!o->pickaxe[0])
- return 0;
if (diff_populate_filespec(one, 0))
return 0;
static int has_changes(struct diff_filepair *p, struct diff_options *o,
regex_t *regexp, kwset_t kws)
{
+ if (!o->pickaxe[0])
+ return 0;
+
if (!DIFF_FILE_VALID(p->one)) {
if (!DIFF_FILE_VALID(p->two))
return 0; /* ignore unmerged */