From: Christian Couder Date: Tue, 27 Oct 2026 12:20:50 GMT Subject: Re: [PATCH v2 2/6] odb/source-files: always load alternates via primary object directory Message-ID: In-Reply-To: <20261023-pks-odb-files-reload-alternates-v2-2-30559d7ff43b@pks.im> On Fri, Oct 23, 2026 at 2:48 PM Patrick Steinhardt wrote: > > The files source tracks a list of object directories. The head of the Nit (to match 'the "files" source' used below): s/files/"files"/ > list is typically expected to be the primary object directory, whereas > the tail is the list of alternates linked to it. This assumption does > not always hold though, as transactions cause us to prepend another > quarantine object directory to the list. > > This is not much of a problem now, but in a subsequent commit we're > about to re-read "objects/info/alternates" when we hit a missing > objects. s/objects/object/ > So we may start calling `prepare_alternates()` in situations > where the head of the list is _not_ the primary object directory, but if > so we would now try to read alternates from the quarantine directory and > not from the primary object directory. > > Fix this issue by instead using the path of the "files" source both when > reading alternates in `prepare_alternates()` and when deduplicating the > primary object directory in `odb_files_dir_is_usable()`. Yeah, the change looks good to me. Thanks.