Re: [External] Re: Missing Promisor Objects in Partial Repo Design Doc
From: Han Young <hidden>
Date: 2024-10-12 03:30:18
On Sat, Oct 12, 2024 at 10:05 AM Jonathan Tan [off-list ref] wrote:
So I think we'll need to use do_not_die_on_missing_objects. It does have the weakness that if the object is not supposed to be missing, we don't inform the user, but perhaps this is OK here because we know that all objects we encounter on this object walk are promisor objects, so if it's missing, it's OK.
And I think users would prefer the git command to succeed if possible, rather than die on the first (noncritical) error. Maybe show a warning and swallow the error?
In addition to do_not_die_on_missing_objects, we'll also need the actual code that stops iteration through objects that pass our "best effort" promisor object check. Probably the best place is in get_revision_1() after the NULL check
get_revision_1() only does commit limiting though. Some callers of rev-list also do tree walking on commits, in a (corrupted) partial repo, tree could also be missing. There isn't a central place we can stop tree walking, callers using this feature would have to implement "tree walking early termination" themself.