Skip to content

Commit

Permalink
Merge branch 'maint-1.7.7' into maint
Browse files Browse the repository at this point in the history
* maint-1.7.7:
  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
  • Loading branch information
Junio C Hamano committed Jan 13, 2012
2 parents 113e828 + 8f83acf commit 5a6a939
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Documentation/RelNotes/1.7.6.6.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ Fixes since v1.7.6.5
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.
5 changes: 5 additions & 0 deletions Documentation/RelNotes/1.7.7.6.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ Fixes since v1.7.7.5
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.
9 changes: 7 additions & 2 deletions builtin/pack-objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -1456,11 +1456,16 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,
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;
Expand Down

0 comments on commit 5a6a939

Please sign in to comment.