From: Patrick Steinhardt Date: Fri, 11 Sep 2026 12:23:06 GMT Subject: Re: [PATCH v2 05/10] odb: provide infrastructure for pluggable fsck checks Message-ID: In-Reply-To: <87a4ponipw.fsf@emacs.iotcl.com> On Fri, Sep 11, 2026 at 01:14:03PM +0200, Toon Claes wrote: > Patrick Steinhardt writes: > > diff --git a/odb.c b/odb.c > > index 1fe20808eb..766043b685 100644 > > --- a/odb.c > > +++ b/odb.c > > @@ -1177,3 +1177,12 @@ void odb_reprepare(struct object_database *o) > > { > > odb_prepare(o, ODB_PREPARE_FLUSH_CACHES); > > } > > + > > +int odb_fsck(struct object_database *odb, struct odb_fsck_options *options) > > +{ > > + int ret = 0; > > + for (struct odb_source *source = odb->sources; source; source = source->next) > > + if ((options->flags & ODB_FSCK_FULL) || source->local) > > + ret |= odb_source_fsck(source, options); > > Shouldn't it be the responsibility of the source to determine whether it > should be included due to the `--full` flag? In the future there might > be other types of sources which have possibly a different meaning for > "local". So would it make sense to have them check for ODB_FSCK_FULL > themselves. That's actually a sensible idea, doubly so because we're going to move handling of alternates into the source itself. So at that point, we would be forced to move it into the "files" backend anyway. Will adapt. Patrick