From 046aa6440fdf9a94df5e2f0609bef5d7415ff94a Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 23 May 2005 00:25:15 -0700 Subject: [PATCH] [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 Signed-off-by: Linus Torvalds --- diffcore-pickaxe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c index be1bbcc5..fea62d51 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) -- 2.11.0