summaryrefslogtreecommitdiff
path: root/builtin/pack-objects.c
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-05-05 10:47:16 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-05-06 18:49:32 +0900
commit58bd77b66a83e7d8bcbc4e756ab997416d246be2 (patch)
treebc6c723f8dfb04ab9410c40c2ae1bb6e1fb4ffcc /builtin/pack-objects.c
parentGit 2.17 (diff)
downloadtgif-58bd77b66a83e7d8bcbc4e756ab997416d246be2.tar.xz
pack-objects: validation and documentation about unreachable options
These options are added in [1] [2] [3]. All these depend on running rev-list internally which is normally true since they are always used with "--all --objects" which implies --revs. But let's keep this dependency explicit. While at there, add documentation for them. These are mostly used internally by git-repack. But it's still good to not chase down the right commit message to know how they work. [1] ca11b212eb (let pack-objects do the writing of unreachable objects as loose objects - 2008-05-14) [2] 08cdfb1337 (pack-objects --keep-unreachable - 2007-09-16) [3] e26a8c4721 (repack: extend --keep-unreachable to loose objects - 2016-06-13) Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/pack-objects.c')
-rw-r--r--builtin/pack-objects.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index e9d3cfb9e3..b0f3e462f3 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -3087,6 +3087,8 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
fetch_if_missing = 0;
argv_array_push(&rp, "--exclude-promisor-objects");
}
+ if (unpack_unreachable || keep_unreachable || pack_loose_unreachable)
+ use_internal_rev_list = 1;
if (!reuse_object)
reuse_delta = 0;