aboutsummaryrefslogtreecommitdiff
path: root/builtin/pack-objects.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-04-08 12:00:32 -0700
committerJunio C Hamano <gitster@pobox.com>2014-04-08 12:00:33 -0700
commit967f8c918465312cc6cc1bcbcfacafcf95152bd8 (patch)
tree72882dba893944951e58755e1f7d6a753d555b98 /builtin/pack-objects.c
parentd59c12d7ad39f942fc60578ba1e934822f40445b (diff)
parent69e4b3426a608b4965c1cb0c6eab5252d880178b (diff)
downloadgit-967f8c918465312cc6cc1bcbcfacafcf95152bd8.tar.gz
git-967f8c918465312cc6cc1bcbcfacafcf95152bd8.tar.xz
Merge branch 'jk/pack-bitmap'
* jk/pack-bitmap: pack-objects: do not reuse packfiles without --delta-base-offset add `ignore_missing_links` mode to revwalk
Diffstat (limited to 'builtin/pack-objects.c')
-rw-r--r--builtin/pack-objects.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index c1f431087..de36c60ca 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -2439,12 +2439,23 @@ static void loosen_unused_packed_objects(struct rev_info *revs)
}
}
+/*
+ * This tracks any options which a reader of the pack might
+ * not understand, and which would therefore prevent blind reuse
+ * of what we have on disk.
+ */
+static int pack_options_allow_reuse(void)
+{
+ return allow_ofs_delta;
+}
+
static int get_object_list_from_bitmap(struct rev_info *revs)
{
if (prepare_bitmap_walk(revs) < 0)
return -1;
- if (!reuse_partial_packfile_from_bitmap(
+ if (pack_options_allow_reuse() &&
+ !reuse_partial_packfile_from_bitmap(
&reuse_packfile,
&reuse_packfile_objects,
&reuse_packfile_offset)) {