summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 75dedd5)
raw | patch | inline | side by side (parent: 75dedd5)
author | Linus Torvalds <torvalds@osdl.org> | |
Thu, 29 Jun 2006 21:04:01 +0000 (14:04 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 29 Jun 2006 22:24:29 +0000 (15:24 -0700) |
In the repacking window, if both objects we are looking at already came
from the same (old) pack-file, don't bother delta'ing them against each
other.
That means that we'll still always check for better deltas for (and
against!) _unpacked_ objects, but assuming incremental repacks, you'll
avoid the delta creation 99% of the time.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
from the same (old) pack-file, don't bother delta'ing them against each
other.
That means that we'll still always check for better deltas for (and
against!) _unpacked_ objects, but assuming incremental repacks, you'll
avoid the delta creation 99% of the time.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
pack-objects.c | patch | blob | history |
diff --git a/pack-objects.c b/pack-objects.c
index bed2497b7974bed96a6ac9478807059cb8de17cb..6e1767652c886d48781f7fbeb9599d57b1de09c7 100644 (file)
--- a/pack-objects.c
+++ b/pack-objects.c
if (trg_entry->preferred_base)
return -1;
+ /*
+ * We do not bother to try a delta that we discarded
+ * on an earlier try.
+ */
+ if (trg_entry->in_pack && trg_entry->in_pack == src_entry->in_pack)
+ return 0;
+
/*
* If the current object is at pack edge, take the depth the
* objects that depend on the current object into account --