Merge commit

6c51b4c9ed97c5105e8ffb585cd625403e297ead

Merge branch 'sa/rev-list-missing-only'

The git rev-list command has been augmented with a '--missing-only'
option that filters the output to only show missing objects,
stripping the leading '?' character and suppressing present objects,
which is useful when used in combination with '--missing=print' or
'--missing=print-info'.

* sa/rev-list-missing-only:
  rev-list: add --missing-only option to filter output

Junio C Hamano <gitster@pobox.com> · 2026-09-14 21:02 UTC

Browse files

Combined diff: only what this merge did beyond taking one side. Added lines are colored by the parent they came from; bold lines came from none of them; removed lines are red.

1 file changed, +4 −2
modified builtin/rev-list.c
@@@ -746,10 -766,12 +767,12 @@@ int cmd_rev_list(int argc
767 for (i = 1; i < argc; i++) {
768 const char *arg = argv[i];
769 if (!strcmp(arg, "--exclude-promisor-objects")) {
- fetch_if_missing = 0;
770 + repo->fetch_if_missing = 0;
771 revs.exclude_promisor_objects = 1;
772 } else if (skip_prefix(arg, "--missing=", &arg)) {
- parse_missing_action_value(arg);
773 + parse_missing_action_value(repo, arg);
774 + } else if (!strcmp(arg, "--missing-only")) {
775 + arg_missing_only = 1;
776 } else if (!strcmp(arg, "-z")) {
777 line_term = '\0';
778 info_term = '\0';