From: Patrick Steinhardt Date: Fri, 16 Jan 2026 07:03:24 GMT Subject: Re: [PATCH 03/14] object-file: extract function to read object info from path Message-ID: In-Reply-To: On Thu, Jan 15, 2026 at 12:31:13PM -0600, Justin Tobler wrote: > On 26/01/15 12:04PM, Patrick Steinhardt wrote: > > diff --git a/object-file.c b/object-file.c > > index 8fa461dd59..a651129426 100644 > > --- a/object-file.c > > +++ b/object-file.c > [snip] > > @@ -455,7 +438,7 @@ int odb_source_loose_read_object_info(struct odb_source *source, > > goto out; > > } > > > > - fd = open_loose_object(source->loose, oid, &path); > > + fd = git_open(path); > > Here we already have the path, so there is no need to invoke > odb_loose_path() again via open_loose_object(). We can instead call > git_open() directly. Looks good. > > If I understand correctly, even before this change the path was already > available so using open_loose_object() here was already redundant. It actually wasn't. `open_loose_object()` was responsible for calling `odb_loose_path()`, and that path was then also assigned to the out pointer. Patrick