Merge branch 'jk/disable-pack-reuse-when-broken'

"pack-objects" can stream a slice of an existing packfile out when
the pack bitmap can tell that the reachable objects are all needed
in the output, without inspecting individual objects.  This
strategy however would not work well when "--local" and other
options are in use, and need to be disabled.

* jk/disable-pack-reuse-when-broken:
  t5310: fix "; do" style
  pack-objects: disable pack reuse for object-selection options
This commit is contained in:
Junio C Hamano
2017-05-29 12:34:44 +09:00
2 changed files with 50 additions and 4 deletions

View File

@ -2728,7 +2728,11 @@ static void loosen_unused_packed_objects(struct rev_info *revs)
*/
static int pack_options_allow_reuse(void)
{
return pack_to_stdout && allow_ofs_delta;
return pack_to_stdout &&
allow_ofs_delta &&
!ignore_packed_keep &&
(!local || !have_non_local_packs) &&
!incremental;
}
static int get_object_list_from_bitmap(struct rev_info *revs)