{"thread":{"id":"61921","subject":"[PATCH] doc: pack-objects: clarify --missing option","startedAt":"2024-08-08T06:21:32Z","lastAt":"2024-08-08T07:48:47Z","messageCount":2,"participants":["Han Young","Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"500402","messageId":"20240808062120.34629-1-hanyang.tony@bytedance.com","threadId":"61921","inReplyTo":null,"subject":"[PATCH] doc: pack-objects: clarify --missing option","fromName":"Han Young","fromEmail":"hanyang.tony@bytedance.com","sentAt":"2024-08-08T06:21:20Z","receivedAt":"2024-08-08T06:21:32Z","isPatch":true,"sender":{"key":"hanyang.tony@bytedance.com","avatar":"https://avatars.githubusercontent.com/u/108711387?v=4"},"body":"Since ee47243d76 (pack-objects: no fetch when allow-{any,promisor},\n2020-08-05), we mention that --missing=allow-any and --missing=allow-promisor\ndo not fetch missing objects. But this is only true for missing objects\nthat are discovered during object traversal. We will still fetch\nmissing objects read from stdin.\n\nSigned-off-by: Han Young <hanyang.tony@bytedance.com>\n---\nobjects read from stdin ignore --missing option, if the repo has\npromisor remote, we will try to fetch missing objects. Even if\nthe missing objects is not \"EXPECTED promisor missing objects\".\n\"--missing=allow-promisor\" will not raise an error on such cases.\n\n Documentation/git-pack-objects.txt | 9 +++++----\n 1 file changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt\nindex e32404c6aa..0c1f86dabe 100644\n--- a/Documentation/git-pack-objects.txt\n+++ b/Documentation/git-pack-objects.txt\n@@ -313,13 +313,14 @@ attempt to fetch missing objects will be made before declaring them missing.\n This is the default action.\n +\n The form '--missing=allow-any' will allow object traversal to continue\n-if a missing object is encountered.  No fetch of a missing object will occur.\n-Missing objects will silently be omitted from the results.\n+if a missing object is encountered.  No fetch of a missing object will occur\n+during object traversal. Missing objects will silently be omitted from the\n+results.\n +\n The form '--missing=allow-promisor' is like 'allow-any', but will only\n allow object traversal to continue for EXPECTED promisor missing objects.\n-No fetch of a missing object will occur.  An unexpected missing object will\n-raise an error.\n+No fetch of a missing object will occur during object traversal.\n+An unexpected missing object will raise an error.\n \n --exclude-promisor-objects::\n \tOmit objects that are known to be in the promisor remote.  (This\n-- \n2.45.2\n\n"},{"id":"500415","messageId":"ZrR4WVtSs5deJCPu@tanuki","threadId":"61921","inReplyTo":"20240808062120.34629-1-hanyang.tony@bytedance.com","subject":"Re: [PATCH] doc: pack-objects: clarify --missing option","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-08-08T07:48:41Z","receivedAt":"2024-08-08T07:48:47Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Thu, Aug 08, 2024 at 02:21:20PM +0800, Han Young wrote:\n> Since ee47243d76 (pack-objects: no fetch when allow-{any,promisor},\n> 2020-08-05), we mention that --missing=allow-any and --missing=allow-promisor\n> do not fetch missing objects. But this is only true for missing objects\n> that are discovered during object traversal. We will still fetch\n> missing objects read from stdin.\n\nI have to wonder whether this is intentional or a bug. It rather feels\nlike the latter to me. Let me Cc Chris, who has written most of the\ninfra of this feature.\n\nPatrick\n"}]}