summaryrefslogtreecommitdiffstats
path: root/diffcore-pickaxe.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-11-15 10:23:57 -0800
committerJunio C Hamano <gitster@pobox.com>2012-11-15 10:23:58 -0800
commit84fcfaf92b857b22e64f4d33e06cdd5701e5e331 (patch)
treec97faf2632c74ea239817c08bff07363ebacba77 /diffcore-pickaxe.c
parentb398fcc2623872225e3534c8344ca5734cbfe164 (diff)
parentb1c2f57db326c43ec286855b396fb16b4890cf2d (diff)
downloadgit-84fcfaf92b857b22e64f4d33e06cdd5701e5e331.tar.gz
git-84fcfaf92b857b22e64f4d33e06cdd5701e5e331.zip
Merge branch 'jk/maint-diff-grep-textconv'
Fixes inconsistent use of textconv with "git log -G". * jk/maint-diff-grep-textconv: diff_grep: use textconv buffers for add/deleted files
Diffstat (limited to 'diffcore-pickaxe.c')
-rw-r--r--diffcore-pickaxe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c
index ed23eb4bdd..a209376354 100644
--- a/diffcore-pickaxe.c
+++ b/diffcore-pickaxe.c
@@ -104,10 +104,10 @@ static int diff_grep(struct diff_filepair *p, struct diff_options *o,
if (!mf2.ptr)
return 0; /* ignore unmerged */
/* created "two" -- does it have what we are looking for? */
- hit = !regexec(regexp, p->two->data, 1, &regmatch, 0);
+ hit = !regexec(regexp, mf2.ptr, 1, &regmatch, 0);
} else if (!mf2.ptr) {
/* removed "one" -- did it have what we are looking for? */
- hit = !regexec(regexp, p->one->data, 1, &regmatch, 0);
+ hit = !regexec(regexp, mf1.ptr, 1, &regmatch, 0);
} else {
/*
* We have both sides; need to run textual diff and see if