Re: [PATCH 01/13] commit-graph: require resolved packfile paths for `stdin_packs`
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Oct 6, 2026, 12:18 UTC
- Message-ID
- <asTnBsWxEvgphOV7@pks.im>
- In-Reply-To
- <CAOLa=ZS_S3bYXEufor7AgXpX76NwtV4NJdGRO57-bpSkYZrzvw@mail.gmail.com>
On Mon, Oct 05, 2026 at 03:27:27PM -0400, Karthik Nayak wrote:
Show 14 quoted lines
> Patrick Steinhardt <ps@pks.im> writes: > > > Users can ask git-commit-graph(1) to write a commit graph specifically > > for a set of packfiles via the "--stdin-packs" option. Those users are > > expected to pass in relative paths, and those eventually get resolved in > > `fill_oids_from_packs()`. This ties the logic in "commit-graph.c" to the > > specific object database source. > > > > Refactor the logic to instead require the caller to pass in resolved > > packfiles to untangle that dependency. > > > > Nit: the changes look good, what I'm missing is 'why' are we doing this > change.
It's basically this sentence:
This ties the logic in "commit-graph.c" to the specific object database source.
With the current logic we have assumptions in "commit-graph.c" about where a specific packfile lives relative to an object database source. But with the next commit that becomes a bit harder to realize So resolving packfile paths early on gets rid of parts of these assumptions, so that we don't have to resolve those paths in "commit-graph.c" anymore.
I'll rephrase this a bit.
Patrick