On Mon, Oct 05, 2026 at 03:27:27PM -0400, Karthik Nayak wrote:
Patrick Steinhardt [off-list ref] writes:
quoted
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