Merge branch 'nd/pack-unreachable-objects-doc'
authorJunio C Hamano <gitster@pobox.com>
Wed, 23 May 2018 05:38:24 +0000 (14:38 +0900)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 May 2018 05:38:24 +0000 (14:38 +0900)
Doc update.

* nd/pack-unreachable-objects-doc:
pack-objects: validation and documentation about unreachable options

Documentation/git-pack-objects.txt
builtin/pack-objects.c
index 6bfac6b7ff2c4213da4be27ac63d31d76913800d..d95b472d16828b2bea304727e7c5daaa2b75ae89 100644 (file)
@@ -276,6 +276,19 @@ Unexpected missing object will raise an error.
        locally created objects [without .promisor] and objects from the
        promisor remote [with .promisor].)  This is used with partial clone.
 
+--keep-unreachable::
+       Objects unreachable from the refs in packs named with
+       --unpacked= option are added to the resulting pack, in
+       addition to the reachable objects that are not in packs marked
+       with *.keep files. This implies `--revs`.
+
+--pack-loose-unreachable::
+       Pack unreachable loose objects (and their loose counterparts
+       removed). This implies `--revs`.
+
+--unpack-unreachable::
+       Keep unreachable objects in loose form. This implies `--revs`.
+
 SEE ALSO
 --------
 linkgit:git-rev-list[1]
index 8552d7e42e12d2729ae76a6cbf316e1669f1b8f4..3df0bf0f6f7a7eec077485f7027e0c551a6d5343 100644 (file)
@@ -3241,6 +3241,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;