Skip to content

rev-list: add --missing=print-only mode

Siddharth Asthana git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1rev-list: add --missing=print-only modeDocumentation/rev-list-options.adoc builtin/rev-list.c t/t6022-rev-list-missing.sh+68 -129 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH v1 0/1] rev-list: add --missing=print-only mode

Hi,

At GitLab, Gitaly uses rev-list --missing=print to find missing objects in partial clones. The current output mixes present and missing objects together, with missing ones prefixed by '?', so Gitaly has to post-process the output to extract just the missing OIDs. Having a dedicated mode that outputs only the missing OIDs directly would simplify this.

This patch adds --missing=print-only which suppresses all regular object output and prints only the missing OIDs, one per line, without the '?' prefix. A missing_action_prints() helper consolidates the repeated three-way checks for MA_PRINT/MA_PRINT_INFO/MA_PRINT_ONLY.

The series is based on top of 9f223ef1c0 (Git 2.54-rc2).

CI: https://gitlab.com/gitlab-org/git/-/pipelines/2463294546

Siddharth Asthana (1):
rev-list: add --missing=print-only mode

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

base-commit: 9f223ef1c026d91c7ac68cc0211bde255dda6199

Thanks
- Siddharth