From: Junio C Hamano Date: Mon, 23 May 2005 07:25:15 +0000 (-0700) Subject: [PATCH] Performance fix for pickaxe. X-Git-Tag: v0.99~489 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;ds=sidebyside;h=046aa6440fdf9a94df5e2f0609bef5d7415ff94a;p=git.git [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 --- 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)