Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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>
  • Loading branch information
Junio C Hamano authored and Linus Torvalds committed May 23, 2005
1 parent f7c1512 commit 046aa64
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion diffcore-pickaxe.c
Expand Up @@ -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)
Expand Down

0 comments on commit 046aa64

Please sign in to comment.