From: Taylor Blau Date: Fri, 25 Oct 2024 21:28:48 GMT Subject: Re: [PATCH 07/11] packfile: warn people away from parse_packed_git() Message-ID: In-Reply-To: <20241025070222.GG2110355@coredump.intra.peff.net> On Fri, Oct 25, 2024 at 03:02:22AM -0400, Jeff King wrote: > With a name like parse_packed_git(), you might think it's the right way > to access a local pack index and its associated objects. But not so! > It's a one-off used by the dumb-http code to access pack idx files we've > downloaded from the remote, but whose packs we might not have. > > There's only one caller left for this function, and ideally we'd drop it > completely and just inline it there. But that would require exposing > other internals from packfile.[ch], like alloc_packed_git() and > check_packed_git_idx(). > > So let's leave it be for now, and just warn people that it's probably > not what they're looking for. Perhaps in the long run if we eventually > drop dumb-http support, we can remove the function entirely then. That seems like a good step and the right place to stop rather than exposing more internals from packfile.c. Nicely done. Thanks, Taylor