Re: [PATCH 0/3] rev-list: add support for commits in `--missing`
From: Patrick Steinhardt <hidden>
Date: 2023-10-10 06:19:20
On Mon, Oct 09, 2023 at 12:55:25PM +0200, Karthik Nayak wrote:
The `--missing` option in git-rev-list(1) was introduced intitally to deal with missing blobs in the context of promissory notes. Eventually the option was extended to also support tree objects in 7c0fe330d5 (rev-list: handle missing tree objects properly,2018-10-05). This patch series extends the `--missing` option to also add support for commit objects. We do this by introducing a new flag `MISSING` which is added whenever we encounter a missing commit during traversal. Then in `builtin/rev-list` we check for this flag and take the appropriate action based on the `--missing=*` option used. This series is an alternate to the patch series I had posted earlier: https://lore.kernel.org/git/20230908174208.249184-1-karthik.188@gmail.com/ (local). In that patch, we introduced an option `--ignore-missing-links` which was added to expose the `ignore_missing_links` bit to the user. The issue in that patch was that, the option `--ignore-missing-links` didn't play well the pre-existing `--missing` option. This series avoids that route and just extends the `--missing` option for commits to solve the same problem.
I had already reviewed the patches internally at GitLab, so for what it's worth please feel free to add my Reviewed-by. Patrick
Karthik Nayak (3): revision: rename bit to `do_not_die_on_missing_objects` rev-list: move `show_commit()` to the bottom rev-list: add commit object support in `--missing` option builtin/reflog.c | 2 +- builtin/rev-list.c | 93 +++++++++++++++++++------------------ list-objects.c | 2 +- object.h | 2 +- revision.c | 9 +++- revision.h | 20 ++++---- t/t6022-rev-list-missing.sh | 74 +++++++++++++++++++++++++++++ 7 files changed, 145 insertions(+), 57 deletions(-) create mode 100755 t/t6022-rev-list-missing.sh -- 2.41.0
Attachments
- signature.asc [application/pgp-signature] 833 bytes