From: Siddharth Asthana <siddharthasthana31@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, chriscool@tuxfamily.org, toon@iotcl.com,
ps@pks.im, karthik.188@gmail.com, justin@parity.io,
peff@peff.net, phillip.wood123@gmail.com
Subject: Re: [PATCH v2 0/1] rev-list: add --missing-only option to filter output
Date: Wed, 2 Sep 2026 01:57:51 +0530 [thread overview]
Message-ID: <29b5003e-48b3-490b-a4ec-c57088acc441@gmail.com> (raw)
In-Reply-To: <xmqq1pbcsq1h.fsf@gitster.g>
On 02/09/26 01:27, Junio C Hamano wrote:
> Siddharth Asthana <siddharthasthana31@gmail.com> writes:
>
>> At GitLab, Gitaly uses rev-list --missing=print on partial clones to
>> find missing objects. The output mixes present and missing objects and
>> prefixes missing ones with '?', so we post-process it. --missing-only
>> avoids that.
>
> Not an objection to the feature (as it can already be done with
> post-processing), but stepping back a bit, how is this list of
> missing objects used?
Thanks for asking
>
> You know what objects you currently have. They refer to other
> objects, some of which you may lack. You can get a list of them,
> and then what? After fetching them from 'origin', you will have
> a new set of missing objects (e.g., after fetching a missing
> commit, its parents become known and missing; after fetching a
> missing tree, the blobs and trees contained in it become known
> and missing).
>
> Fetching missing objects a batch at a time sounds like too much
> back-and-forth to peel the onion, if the process using
> '--missing-only' is trying to find out what it wants to fetch,
> and would be a rather inefficient way to backfill a shallow
> clone. So I wonder how this fits into the larger picture.
Agreed, we are not using it that way, and I would not want people to use
it as a multi-round fetch loop either.
In Gitaly the main caller is transaction packing. When we commit a
transaction we walk only the quarantine (plus the new ref tips) with
something like:
git rev-list --objects --missing=print --stdin
- Objects that exist in the quarantine get packed and logged with the
transaction.
- Objects that show up as missing (the '?' lines) are recorded as the
transaction's dependencies. At apply time we check those OIDs already
exit in the main repo and abort if they do not. We do not fetch them;
they are expected to already be outside the quarantine.
So the missing list is a one-shot dependency set from a single walk, not
iterative discovery / onion peeling. Today we parse the mixed output and
strip the leading '?'. --missing-only is only so that path (and the old
"count missing" demo) can get bare OIDs without post-processing.
Happy to clarify this in the commit message / docs in a v3 if useful.
Thanks,
Siddharth
>
> Thanks.
next prev parent reply other threads:[~2026-09-01 20:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-19 8:48 [PATCH v1 0/1] rev-list: add --missing=print-only mode Siddharth Asthana
2026-04-19 8:48 ` [PATCH v1 1/1] " Siddharth Asthana
2026-04-19 22:36 ` Derrick Stolee
2026-04-20 10:24 ` Siddharth Asthana
2026-04-20 11:44 ` Derrick Stolee
2026-04-20 7:43 ` Patrick Steinhardt
2026-04-20 8:57 ` Phillip Wood
2026-04-20 9:55 ` Patrick Steinhardt
2026-04-20 10:37 ` Siddharth Asthana
2026-04-20 11:00 ` Kristoffer Haugsbakk
2026-04-20 10:33 ` Siddharth Asthana
2026-09-01 18:50 ` [PATCH v2 0/1] rev-list: add --missing-only option to filter output Siddharth Asthana
2026-09-01 18:51 ` [PATCH v2 1/1] " Siddharth Asthana
2026-09-01 19:57 ` [PATCH v2 0/1] " Junio C Hamano
2026-09-01 20:27 ` Siddharth Asthana [this message]
2026-09-02 21:26 ` Junio C Hamano
2026-09-03 20:45 ` [PATCH v3 " Siddharth Asthana
2026-09-03 20:45 ` [PATCH v3 1/1] " Siddharth Asthana
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29b5003e-48b3-490b-a4ec-c57088acc441@gmail.com \
--to=siddharthasthana31@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=justin@parity.io \
--cc=karthik.188@gmail.com \
--cc=peff@peff.net \
--cc=phillip.wood123@gmail.com \
--cc=ps@pks.im \
--cc=toon@iotcl.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox