git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Performance fix for pickaxe.

From
Junio C Hamano <junkio@cox.net>
Date
May 23, 2005, 07:25 UTC
Message-ID
<7vis1a76as.fsf@assigned-by-dhcp.cox.net>

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

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)
------------------------------------------------
Message 1 of 1 in “Performance fix for pickaxe.”
  1. Performance fix for pickaxe.Junio C Hamano, May 23, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.