summaryrefslogtreecommitdiff
path: root/diffcore-pickaxe.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-05-23 00:25:15 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-23 11:49:30 -0700
commit046aa6440fdf9a94df5e2f0609bef5d7415ff94a (patch)
tree01956b9c5e356fdbadb4713124152f6c079b262d /diffcore-pickaxe.c
parentf7c1512af8ff4f821c530f9a4bc8f8ff25733d51 (diff)
downloadgit-046aa6440fdf9a94df5e2f0609bef5d7415ff94a.tar.gz
[PATCH] Performance fix for pickaxe.
The pickaxe was expanding the blobs and searching in them even when it should have already known that both sides are the same. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'diffcore-pickaxe.c')
-rw-r--r--diffcore-pickaxe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c
index be1bbcc53f..fea62d51a0 100644
--- a/diffcore-pickaxe.c
+++ b/diffcore-pickaxe.c
@@ -44,7 +44,8 @@ void diffcore_pickaxe(const char *needle)
if (contains(p->one, needle, len))
diff_q(&outq, p);
}
- else if (contains(p->one, needle, len) !=
+ else if (!diff_unmodified_pair(p) &&
+ contains(p->one, needle, len) !=
contains(p->two, needle, len))
diff_q(&outq, p);
if (onum == outq.nr)