threads / patch / 701

patchPerformance fix for pickaxe.

Subject: [PATCH] Performance fix for pickaxe.

## tl;dr

One message between May 23, 2005 and May 23, 2005. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Junio C Hamano· May 23, 2005, 07:25 UTC · lore

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>
---

diffcore-pickaxe.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-)

Show changes to diffcore-pickaxe.c +2 −1
diff --git a/diffcore-pickaxe.c b/diffcore-pickaxe.c
--- 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)
------------------------------------------------

← back to recent threads