author | Junio C Hamano <gitster@pobox.com> | |
Fri, 13 Jan 2012 07:33:39 +0000 (23:33 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 13 Jan 2012 07:33:39 +0000 (23:33 -0800) |
* maint:
Update draft release notes to 1.7.8.4
Update draft release notes to 1.7.7.6
Update draft release notes to 1.7.6.6
thin-pack: try harder to use preferred base objects as base
Update draft release notes to 1.7.8.4
Update draft release notes to 1.7.7.6
Update draft release notes to 1.7.6.6
thin-pack: try harder to use preferred base objects as base
index 13ce2dc2d7823dfd09d97af8826f9fdcfe79672d..5343e004005e888612305742d75cde68ff157846 100644 (file)
directory when two paths in question are in adjacent directories and
the name of the one directory is a prefix of the other.
+ * When producing a "thin pack" (primarily used in bundles and smart
+ HTTP transfers) out of a fully packed repository, we unnecessarily
+ avoided sending recent objects as a delta against objects we know
+ the other side has.
+
Also contains minor fixes and documentation updates.
index 065ed2ad6cc0e2f5ffe3fc16b73b775181c096c3..b8b86ebc61df5b63dd69c6b74be25128a57b0668 100644 (file)
directory when two paths in question are in adjacent directories and
the name of the one directory is a prefix of the other.
+ * When producing a "thin pack" (primarily used in bundles and smart
+ HTTP transfers) out of a fully packed repository, we unnecessarily
+ avoided sending recent objects as a delta against objects we know
+ the other side has.
+
Also contains minor fixes and documentation updates.
index 3172f1cb3185c28a857096c9d1c51e82167e08fb..c21fc99bdb32622f619305d7945e0c3b1d66ab23 100644 (file)
directory when two paths in question are in adjacent directories and
the name of the one directory is a prefix of the other.
+ * When producing a "thin pack" (primarily used in bundles and smart
+ HTTP transfers) out of a fully packed repository, we unnecessarily
+ avoided sending recent objects as a delta against objects we know
+ the other side has.
+
* "git send-email" did not properly treat sendemail.multiedit as a
boolean (e.g. setting it to "false" did not turn it off).
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 96c1680976fc653a1cd7a9dd81a567885a5b0050..0f2e7b8f5cb26910679c39550d59ef23353a278f 100644 (file)
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
return -1;
/*
- * We do not bother to try a delta that we discarded
- * on an earlier try, but only when reusing delta data.
+ * We do not bother to try a delta that we discarded on an
+ * earlier try, but only when reusing delta data. Note that
+ * src_entry that is marked as the preferred_base should always
+ * be considered, as even if we produce a suboptimal delta against
+ * it, we will still save the transfer cost, as we already know
+ * the other side has it and we won't send src_entry at all.
*/
if (reuse_delta && trg_entry->in_pack &&
trg_entry->in_pack == src_entry->in_pack &&
+ !src_entry->preferred_base &&
trg_entry->in_pack_type != OBJ_REF_DELTA &&
trg_entry->in_pack_type != OBJ_OFS_DELTA)
return 0;