summaryrefslogtreecommitdiff
path: root/Documentation/git-pack-objects.txt
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2020-08-05 23:06:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-08-06 20:01:03 (GMT)
commitee47243d7636d3d54b727ad24027a9167b68ebb1 (patch)
tree6eb472fafd92fafba13ffb8257d95e048ca91f8f /Documentation/git-pack-objects.txt
parent3318238db9498749db6d4feb7a804d366eccfa82 (diff)
downloadgit-ee47243d7636d3d54b727ad24027a9167b68ebb1.zip
git-ee47243d7636d3d54b727ad24027a9167b68ebb1.tar.gz
git-ee47243d7636d3d54b727ad24027a9167b68ebb1.tar.bz2
pack-objects: no fetch when allow-{any,promisor}
The options --missing=allow-{any,promisor} were introduced in caf3827e2f ("rev-list: add list-objects filtering support", 2017-11-22) with the following note in the commit message: This patch introduces handling of missing objects to help debugging and development of the "partial clone" mechanism, and once the mechanism is implemented, for a power user to perform operations that are missing-object aware without incurring the cost of checking if a missing link is expected. The idea that these options are missing-object aware (and thus do not need to lazily fetch objects, unlike unaware commands that assume that all objects are present) are assumed in later commits such as 07ef3c6604 ("fetch test: use more robust test for filtered objects", 2020-01-15). However, the current implementations of these options use has_object_file(), which indeed lazily fetches missing objects. Teach these implementations not to do so. Also, update the documentation of these options to be clearer. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-pack-objects.txt')
-rw-r--r--Documentation/git-pack-objects.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
index eaa2f2a..54d715e 100644
--- a/Documentation/git-pack-objects.txt
+++ b/Documentation/git-pack-objects.txt
@@ -270,15 +270,18 @@ So does `git bundle` (see linkgit:git-bundle[1]) when it creates a bundle.
This option specifies how missing objects are handled.
+
The form '--missing=error' requests that pack-objects stop with an error if
-a missing object is encountered. This is the default action.
+a missing object is encountered. If the repository is a partial clone, an
+attempt to fetch missing objects will be made before declaring them missing.
+This is the default action.
+
The form '--missing=allow-any' will allow object traversal to continue
-if a missing object is encountered. Missing objects will silently be
-omitted from the results.
+if a missing object is encountered. No fetch of a missing object will occur.
+Missing objects will silently be omitted from the results.
+
The form '--missing=allow-promisor' is like 'allow-any', but will only
allow object traversal to continue for EXPECTED promisor missing objects.
-Unexpected missing object will raise an error.
+No fetch of a missing object will occur. An unexpected missing object will
+raise an error.
--exclude-promisor-objects::
Omit objects that are known to be in the promisor remote. (This