summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-05-29 03:34:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-29 03:34:44 (GMT)
commit137a2613a07e556fd77fe374c6f4edd2d5e1b1fc (patch)
tree6c0353991d9dd1859212be80fed996bae70f7c6a /builtin
parent6b526ced6fb1808d1b8a9b30010e45dce10a4e7c (diff)
parentda5a1f81008f89f4e533006df8fa536e43c9c677 (diff)
downloadgit-137a2613a07e556fd77fe374c6f4edd2d5e1b1fc.zip
git-137a2613a07e556fd77fe374c6f4edd2d5e1b1fc.tar.gz
git-137a2613a07e556fd77fe374c6f4edd2d5e1b1fc.tar.bz2
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
Diffstat (limited to 'builtin')
-rw-r--r--builtin/pack-objects.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 82555e4..8043904 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -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)