Re: [PATCH v4] revision: add `--ignore-missing-links` user option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 21, 2023 at 9:16 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> Karthik Nayak <karthik.188@xxxxxxxxx> writes:
>
> > I was thinking about this, but mostly didn't do this, because the
> > interaction with `--missing` is only for non-commit
> > objects. Because for missing commits, `--ignore-missing-links`
> > skips the commit and the value of `--missing` doesn't make any
> > difference.
>
> Hmph, somehow that smells like an existing bug.  So does the "trees
> are not shown by --missing=print, and show_object() is never called
> for missing objects unless they are blobs" you mention.  When the
> user asks "instead of dying, list them so that I can ask around and
> fetch them to repair this repository", shouldn't we do just that?
>
> I wonder if these bugs are something people may be taking advatage
> of and cannot be fixed retroactively?  If we can fix these and nobody
> complains, that would give us the ideal outcome, I would think.
>

Let me prefix with saying that I was partly wrong. `--missing` does work for
trees, only that it's ineffective when used along with the
`ignore_missing_links` bit.

But for commits, `--missing` was never configured to work with. I did a quick
look at the code, we can do something like this for commits too, i.e.
add support
for the `--missing` option. We'll have to add a new flag (maybe
MISSING) so it can
be set during within `repo_parse_commit_gently` so we can parse this
as a missing
object in rev-list.c and act accordingly.

It would invalidate this patch series in some sense. But I'm okay with
that. Does that
sound good to you?




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux