summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-05-23 05:38:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-23 05:38:24 (GMT)
commit5a97e7be8846727597be322bf04541a2c61a2c81 (patch)
treeb5ef40f1cd93fec390a9333358370916fe9a57b9
parentdf20b622fa36de8a65e701e094882a274b452c6a (diff)
parent58bd77b66a83e7d8bcbc4e756ab997416d246be2 (diff)
downloadgit-5a97e7be8846727597be322bf04541a2c61a2c81.zip
git-5a97e7be8846727597be322bf04541a2c61a2c81.tar.gz
git-5a97e7be8846727597be322bf04541a2c61a2c81.tar.bz2
Merge branch 'nd/pack-unreachable-objects-doc'
Doc update. * nd/pack-unreachable-objects-doc: pack-objects: validation and documentation about unreachable options
-rw-r--r--Documentation/git-pack-objects.txt13
-rw-r--r--builtin/pack-objects.c2
2 files changed, 15 insertions, 0 deletions
diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
index 6bfac6b..d95b472 100644
--- a/Documentation/git-pack-objects.txt
+++ b/Documentation/git-pack-objects.txt
@@ -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]
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 8552d7e..3df0bf0 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -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;