Skip to content

rev-list: add --missing-only option to filter output

Siddharth Asthana git 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest1 patch 0 repliesNew
  2. v21 patch 3 repliesSuperseded

Changes in v3 from the cover letter

- Stronger motivation in the commit message (Junio).
- Link to v2:
https://lore.kernel.org/git/[email protected]/

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1rev-list: add --missing-only option to filter outputDocumentation/rev-list-options.adoc builtin/rev-list.c t/t6022-rev-list-missing.sh+99 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/1] rev-list: add --missing-only option to filter output

Hi,

v2 added --missing-only as a filter next to --missing=print / --missing=print-info. Junio asked how the missing list is used, so this v3 only updates the log message.

It is a one-shot walk. Gitaly uses --missing=print when packing a quarantine and treats '?' lines as objects that must already be in the main repo. Tests do the same (is this blob still missing). --missing-only is that list without the prefix, not a fetch loop.

Based on 1630431f32 (The 21st batch, 2026-08-31).

Changes from v2:
- Stronger motivation in the commit message (Junio).
- Link to v2:
https://lore.kernel.org/git/[email protected]/

Thanks,
Siddharth

---
Siddharth Asthana (1):
rev-list: add --missing-only option to filter output

 Documentation/rev-list-options.adoc | 13 ++++++++
 builtin/rev-list.c                  | 42 ++++++++++++++++++++++---
 t/t6022-rev-list-missing.sh         | 49 +++++++++++++++++++++++++++++
 3 files changed, 99 insertions(+), 5 deletions(-)

Range-diff versus v2:

1: 3c89e6bc38 ! 1: c751ff41a4 rev-list: add --missing-only option to filter output
@@ Commit message

git rev-list --objects --all --missing=print | perl -ne 'print if s/^[?]//'

+ This is for a one-shot walk, not a fetch loop. Callers already have
+ --missing=print and strip the leading '?'. Gitaly does that when packing
+ a quarantine: '?' lines are objects that must already exist in the main
+ repo. Tests do the same (is this blob still missing). --missing-only is
+ just that list without the prefix.
+
Add --missing-only. Use it with --missing=print or --missing=print-info to print only missing objects. --missing= still picks the format; --missing-only only filters. The leading '?' is omitted. With

base-commit: 1630431f326e15fcde608827b5ff38422528eb59