From: Patrick Steinhardt Date: Mon, 31 Aug 2026 06:00:38 GMT Subject: Re: [PATCH 05/10] odb: provide infrastructure for pluggable fsck checks Message-ID: In-Reply-To: On Thu, Aug 27, 2026 at 06:49:38AM -0400, Karthik Nayak wrote: > Patrick Steinhardt writes: > > diff --git a/builtin/fsck.c b/builtin/fsck.c > > index 3f6056535f..adbe192e56 100644 > > --- a/builtin/fsck.c > > +++ b/builtin/fsck.c > > @@ -977,7 +979,8 @@ int cmd_fsck(int argc, > > OPT_BOOL(0, "root", &show_root, N_("report root nodes")), > > OPT_BOOL(0, "cache", &keep_cache_objects, N_("make index objects head nodes")), > > OPT_BOOL(0, "reflogs", &include_reflogs, N_("make reflogs head nodes (default)")), > > - OPT_BOOL(0, "full", &check_full, N_("also consider packs and alternate objects")), > > Question: OPT_BOOL sets 'check_full' to 0 when using '--no-full', does > OPT_BIT provide similar functionality? Yes, it does. > > @@ -1047,10 +1050,13 @@ int cmd_fsck(int argc, > > mark_object_for_connectivity, repo, 0); > > } else { > > for (source = repo->objects->sources; source; source = source->next) > > - if (check_full || source->local) > > + if ((odb_fsck_opts.flags & ODB_FSCK_FULL) || source->local) > > fsck_source(repo, source); > > > > - if (check_full) { > > + if (odb_fsck(repo->objects, &odb_fsck_opts) < 0) > > + errors_found |= ERROR_OBJECT; > > + > > So most of the functionality will move into this and we'll cleanup > around in the following commits. Yup, exactly. Patrick