From: Patrick Steinhardt Date: Thu, 18 Dec 2025 09:10:16 GMT Subject: Re: [PATCH 2/8] packfile: always declare object info to be OI_PACKED Message-ID: In-Reply-To: On Thu, Dec 18, 2025 at 04:23:03PM +0900, Junio C Hamano wrote: > Patrick Steinhardt writes: > > > When reading object info via a packfile we yield one of two types: > > > > - The object can either be OI_PACKED, which is what a caller would > > typically expect. > > > > - Or it can be OI_DBCACHED if it is stored in the delta base cache. > > > > The latter really is an implementation detail though, and callers > > typically don't care at all about the difference. Furthermore, the > > information whether or not it is part of the delta base cache can > > already be derived via the `is_delta` field, so the fact that we discern > > between OI_PACKED and OI_DBCACHED only further complicates the > > interface. > > If this were "and no existing callers check at all", it would be > trivial to decide for this change. In fact you do say that but in a > weaker form just below. > > > Drop the OI_DBCACHED enum completely. There don't seem to be any callers > > that care about the distinction. > > "git grep OI_DBCACHED" shows only a single hit, which is what you > are getting rid of in this patch, but I cannot claim that we did a > sufficient audit, as this change will break code paths that check if > they got OI_PACKED and do something differently (or if what they got > is different from OI_PACKED, for that matter). That's a fair complaint. I'll adapt the commit message to include the investigation. Thanks! Patrick