public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Justin Tobler <jltobler@gmail•com>
To: git@vger•kernel.org
Cc: karthik.188@gmail•com, christian.couder@gmail•com,
	Justin Tobler <jltobler@gmail•com>
Subject: [PATCH v2 0/2] rev-list: print additional missing object information
Date: Thu,  9 Jan 2025 23:34:16 -0600	[thread overview]
Message-ID: <20250110053417.2602109-2-jltobler@gmail.com> (raw)
In-Reply-To: <20250108034012.211043-1-jltobler@gmail.com>

Greetings,

It is possible to configure git-rev-list(1) to print the OID of missing
objects by setting the `--missing=print` option. While it is useful
knowing about these objects, it would be nice to have even more context
about the objects that are missing. Luckily, from an object containing
the missing object, it is possible to infer additional information the
missing object. For example, if the tree containing a missing blob still
exists, the tree entry for the missing object should contain path and
type information.

This series aims to provide a git-rev-list(1) option that, when combined
with the existing `--missing=print` option, prints other potentially
interesting information about the missing object.

- Patch 1 introduces the `--missing-info` option and supports printing
  the missing object path information.

- Patch 2 extends the `--missing-info` option to also print object type
  information about the missing object.

Changes in V2:

- A `--missing-info` option is now used instead of an explicit
  `--missing=print-type` option to print additional missing object info
  in a more generalized fashion. This enables other use cases outside of
  just the missing object type.

- Support for printing the full path of the missing object from the
  top-level tree is also added with `--missing-info`.

Due to all rearranging/changes in this version, I opted not to include a
range-diff.

Thanks,
-Justin

Justin Tobler (2):
  rev-list: add --missing-info to print missing object path
  rev-list: extend --missing-info to print missing object type

 Documentation/rev-list-options.txt |  15 +++++
 builtin/rev-list.c                 | 103 ++++++++++++++++++++++++-----
 t/t6022-rev-list-missing.sh        |  53 +++++++++++++++
 3 files changed, 156 insertions(+), 15 deletions(-)


base-commit: b74ff38af58464688b211140b90ec90598d340c6
-- 
2.47.1


  parent reply	other threads:[~2025-01-10  5:38 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08  3:40 [PATCH] rev-list: print missing object type with --missing=print-type Justin Tobler
2025-01-08 10:08 ` Christian Couder
2025-01-08 22:28   ` Justin Tobler
2025-01-08 15:17 ` Junio C Hamano
2025-01-08 22:18   ` Justin Tobler
2025-01-08 22:43     ` Junio C Hamano
2025-01-08 23:13       ` Justin Tobler
2025-01-10  5:34 ` Justin Tobler [this message]
2025-02-01 20:16   ` [PATCH v3 0/4] rev-list: print additional missing object information Justin Tobler
2025-02-01 20:16     ` [PATCH v3 1/4] quote: add c quote flag to ignore core.quotePath Justin Tobler
2025-02-03  9:51       ` Christian Couder
2025-02-03 22:14         ` Junio C Hamano
2025-02-03 22:33       ` Junio C Hamano
2025-02-04 16:40         ` Junio C Hamano
2025-02-04 22:50           ` Justin Tobler
2025-02-01 20:16     ` [PATCH v3 2/4] quote: add quote_path() flag to ignore config Justin Tobler
2025-02-02 10:52       ` Phillip Wood
2025-02-04 22:39         ` Justin Tobler
2025-02-11 16:51           ` Phillip Wood
2025-02-03 10:07       ` Christian Couder
2025-02-03 22:52       ` Junio C Hamano
2025-02-01 20:16     ` [PATCH v3 3/4] rev-list: add print-info action to print missing object path Justin Tobler
2025-02-01 20:16     ` [PATCH v3 4/4] rev-list: extend print-info to print missing object type Justin Tobler
2025-02-03 10:45     ` [PATCH v3 0/4] rev-list: print additional missing object information Christian Couder
2025-02-04 22:51       ` Justin Tobler
2025-02-05  0:41     ` [PATCH v4 0/2] " Justin Tobler
2025-02-05  0:41       ` [PATCH v4 1/2] rev-list: add print-info action to print missing object path Justin Tobler
2025-02-05  0:41       ` [PATCH v4 2/2] rev-list: extend print-info to print missing object type Justin Tobler
2025-02-05 10:35       ` [PATCH v4 0/2] rev-list: print additional missing object information Christian Couder
2025-02-05 17:18         ` Justin Tobler
2025-02-05 13:18       ` Junio C Hamano
2025-02-05 17:17         ` Justin Tobler
2025-02-05 18:29           ` Junio C Hamano
2025-01-10  5:34 ` [PATCH v2 1/2] rev-list: add --missing-info to print missing object path Justin Tobler
2025-01-10  8:47   ` Christian Couder
2025-01-10 15:22     ` Junio C Hamano
2025-01-10  5:34 ` [PATCH v2 2/2] rev-list: extend --missing-info to print missing object type Justin Tobler

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=20250110053417.2602109-2-jltobler@gmail.com \
    --to=jltobler@gmail$(echo .)com \
    --cc=christian.couder@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=karthik.188@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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