Skip to content

Commit c4a01a3

Browse files
committed
Merge branch 'maint'
* 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
2 parents 0e1cfc5 + ab8a780 commit c4a01a3

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

Documentation/RelNotes/1.7.6.6.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,9 @@ Fixes since v1.7.6.5
88
directory when two paths in question are in adjacent directories and
99
the name of the one directory is a prefix of the other.
1010

11+
* When producing a "thin pack" (primarily used in bundles and smart
12+
HTTP transfers) out of a fully packed repository, we unnecessarily
13+
avoided sending recent objects as a delta against objects we know
14+
the other side has.
15+
1116
Also contains minor fixes and documentation updates.

Documentation/RelNotes/1.7.7.6.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,9 @@ Fixes since v1.7.7.5
88
directory when two paths in question are in adjacent directories and
99
the name of the one directory is a prefix of the other.
1010

11+
* When producing a "thin pack" (primarily used in bundles and smart
12+
HTTP transfers) out of a fully packed repository, we unnecessarily
13+
avoided sending recent objects as a delta against objects we know
14+
the other side has.
15+
1116
Also contains minor fixes and documentation updates.

Documentation/RelNotes/1.7.8.4.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ Fixes since v1.7.8.3
88
directory when two paths in question are in adjacent directories and
99
the name of the one directory is a prefix of the other.
1010

11+
* When producing a "thin pack" (primarily used in bundles and smart
12+
HTTP transfers) out of a fully packed repository, we unnecessarily
13+
avoided sending recent objects as a delta against objects we know
14+
the other side has.
15+
1116
* "git send-email" did not properly treat sendemail.multiedit as a
1217
boolean (e.g. setting it to "false" did not turn it off).
1318

builtin/pack-objects.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,11 +1434,16 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,
14341434
return -1;
14351435

14361436
/*
1437-
* We do not bother to try a delta that we discarded
1438-
* on an earlier try, but only when reusing delta data.
1437+
* We do not bother to try a delta that we discarded on an
1438+
* earlier try, but only when reusing delta data. Note that
1439+
* src_entry that is marked as the preferred_base should always
1440+
* be considered, as even if we produce a suboptimal delta against
1441+
* it, we will still save the transfer cost, as we already know
1442+
* the other side has it and we won't send src_entry at all.
14391443
*/
14401444
if (reuse_delta && trg_entry->in_pack &&
14411445
trg_entry->in_pack == src_entry->in_pack &&
1446+
!src_entry->preferred_base &&
14421447
trg_entry->in_pack_type != OBJ_REF_DELTA &&
14431448
trg_entry->in_pack_type != OBJ_OFS_DELTA)
14441449
return 0;

0 commit comments

Comments
 (0)