<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/commit-graph.c, branch v2.53.0-rc2</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=v2.53.0-rc2</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=v2.53.0-rc2'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2026-01-21T16:29:00Z</updated>
<entry>
<title>Merge branch 'ps/read-object-info-improvements'</title>
<updated>2026-01-21T16:29:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-01-21T16:29:00Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=bc5cbbe24650f4234ed4ed2c21c58058f96dfcac'/>
<id>urn:sha1:bc5cbbe24650f4234ed4ed2c21c58058f96dfcac</id>
<content type='text'>
The object-info API has been cleaned up.

* ps/read-object-info-improvements:
  packfile: drop repository parameter from `packed_object_info()`
  packfile: skip unpacking object header for disk size requests
  packfile: disentangle return value of `packed_object_info()`
  packfile: always populate pack-specific info when reading object info
  packfile: extend `is_delta` field to allow for "unknown" state
  packfile: always declare object info to be OI_PACKED
  object-file: always set OI_LOOSE when reading object info
</content>
</entry>
<entry>
<title>packfile: drop repository parameter from `packed_object_info()`</title>
<updated>2026-01-12T14:51:15Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-01-12T09:00:47Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=12d3b58b5552750f351ded7166b347446d9543f3'/>
<id>urn:sha1:12d3b58b5552750f351ded7166b347446d9543f3</id>
<content type='text'>
The function `packed_object_info()` takes a packfile and offset and
returns the object info for the corresponding object. Despite these two
parameters though it also takes a repository pointer. This is redundant
information though, as `struct packed_git` already has a repository
pointer that is always populated.

Drop the redundant parameter.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph: use commit_stack</title>
<updated>2025-12-24T23:29:29Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2025-12-24T17:03:26Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=3e456f1d8ac409abcf1da3867c9505f48564e874'/>
<id>urn:sha1:3e456f1d8ac409abcf1da3867c9505f48564e874</id>
<content type='text'>
Replace a commit array implementation with commit_stack.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: expose peeled object ID via the iterator</title>
<updated>2025-11-04T15:32:25Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-10-23T07:16:14Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=f89866163704528f1a6570e134853dbb99120e7c'/>
<id>urn:sha1:f89866163704528f1a6570e134853dbb99120e7c</id>
<content type='text'>
Both the "files" and "reftable" backend are able to store peeled values
for tags in the respective formats. This allows for a more efficient
lookup of the target object of such a tag without having to manually
peel via the object database.

The infrastructure to access these peeled object IDs is somewhat funky
though. When iterating through objects, we store a pointer reference to
the current iterator in a global variable. The callbacks invoked by that
iterator are then expected to call `peel_iterated_oid()`, which checks
whether the globally-stored iterator's current reference refers to the
one handed into that function. If so, we ask the iterator to peel the
object, otherwise we manually peel the object via the object database.
Depending on global state like this is somewhat weird and also quite
fragile.

Introduce a new `struct reference::peeled_oid` field that can be
populated by the reference backends. This field can be accessed via a
new function `reference_get_peeled_oid()` that either uses that value,
if set, or alternatively peels via the ODB. With this change we don't
have to rely on global state anymore, but make the peeled object ID
available to the callback functions directly.

Adjust trivial callers that already have a `struct reference` available.
Remaining callers will be adjusted in subsequent commits.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: introduce wrapper struct for `each_ref_fn`</title>
<updated>2025-11-04T15:32:24Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-10-23T07:16:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=bdbebe5714b25dc9d215b48efbb80f410925d7dd'/>
<id>urn:sha1:bdbebe5714b25dc9d215b48efbb80f410925d7dd</id>
<content type='text'>
The `each_ref_fn` callback function type is used across our code base
for several different functions that iterate through reference. There's
a bunch of callbacks implementing this type, which makes any changes to
the callback signature extremely noisy. An example of the required churn
is e8207717f1 (refs: add referent to each_ref_fn, 2024-08-09): adding a
single argument required us to change 48 files.

It was already proposed back then [1] that we might want to introduce a
wrapper structure to alleviate the pain going forward. While this of
course requires the same kind of global refactoring as just introducing
a new parameter, it at least allows us to more change the callback type
afterwards by just extending the wrapper structure.

One counterargument to this refactoring is that it makes the structure
more opaque. While it is obvious which callsites need to be fixed up
when we change the function type, it's not obvious anymore once we use
a structure. That being said, we only have a handful of sites that
actually need to populate this wrapper structure: our ref backends,
"refs/iterator.c" as well as very few sites that invoke the iterator
callback functions directly.

Introduce this wrapper structure so that we can adapt the iterator
interfaces more readily.

[1]: &lt;ZmarVcF5JjsZx0dl@tanuki&gt;

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ps/commit-graph-per-object-source'</title>
<updated>2025-10-14T05:00:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-10-14T05:00:35Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=47c3e03034dbde74874406d1155e46f86d6bd859'/>
<id>urn:sha1:47c3e03034dbde74874406d1155e46f86d6bd859</id>
<content type='text'>
Code clean-up around commit-graph.

* ps/commit-graph-per-object-source:
  commit-graph: pass graphs that are to be merged as parameter
  commit-graph: return commit graph from `repo_find_commit_pos_in_graph()`
  commit-graph: return the prepared commit graph from `prepare_commit_graph()`
  revision: drop explicit check for commit graph
  blame: drop explicit check for commit graph
</content>
</entry>
<entry>
<title>Merge branch 'tc/last-modified'</title>
<updated>2025-09-08T21:54:35Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-09-08T21:54:35Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=95a8428323a573963c93ece8f875dd3cd25a1a11'/>
<id>urn:sha1:95a8428323a573963c93ece8f875dd3cd25a1a11</id>
<content type='text'>
A new command "git last-modified" has been added to show the closest
ancestor commit that touched each path.

* tc/last-modified:
  last-modified: use Bloom filters when available
  t/perf: add last-modified perf script
  last-modified: new subcommand to show when files were last modified
</content>
</entry>
<entry>
<title>commit-graph: pass graphs that are to be merged as parameter</title>
<updated>2025-09-04T23:16:22Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-09-04T12:49:59Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=62490b6d85882e6a0ba434ab436640e31352ffee'/>
<id>urn:sha1:62490b6d85882e6a0ba434ab436640e31352ffee</id>
<content type='text'>
When determining whether or not we want to merge a commit graph chain we
retrieve the graph that is to be merged via the context's repository.
With an upcoming change though it will become a bit more complex to
figure out the commit graph, which would lead to code duplication.

Prepare for this change by passing the graph that is to be merged as a
parameter.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph: return commit graph from `repo_find_commit_pos_in_graph()`</title>
<updated>2025-09-04T23:16:22Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-09-04T12:49:58Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=88bc3500e5be888c13757d12c4a5cb16e39ec673'/>
<id>urn:sha1:88bc3500e5be888c13757d12c4a5cb16e39ec673</id>
<content type='text'>
The function `repo_find_commit_pos_in_graph()` takes a commit as input
and tries to figure out whether the given repository has a commit graph
that contains that specific commit. If so, it returns the corresponding
position of that commit inside the graph.

Right now though we only return the position, but not the actual graph
that the commit has been found in. This is sensible as repositories
always have the graph in `struct repository::objects::commit_graph`.
Consequently, the caller always knows where to find it.

But in a subsequent change we're going to move the graph into the object
sources. This would require callers of the function to loop through all
sources to find the relevant commit graph.

Refactor the code so that we instead return the commit-graph that the
commit has been found with.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph: return the prepared commit graph from `prepare_commit_graph()`</title>
<updated>2025-09-04T23:16:22Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-09-04T12:49:57Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=199d452758605a3ff15ac7d900653b4de7455e24'/>
<id>urn:sha1:199d452758605a3ff15ac7d900653b4de7455e24</id>
<content type='text'>
When making use of commit graphs, one needs to first prepare them by
calling `prepare_commit_graph()`. Once that function was called and the
commit graph was prepared successfully, the caller is now expected to
access the graph directly via `struct object_database::commit_graph`.

In a subsequent change, we're going to move the commit graph pointer
from `struct object_database` into `struct odb_source`. With this
change, semantics will change so that we use the commit graph of the
first source that has one. Consequently, all callers that currently
deference the `commit_graph` pointer would now have to loop around the
list of sources to find the commit graph.

This would become quite unwieldy. So instead of shifting the burden onto
such callers, adapt `prepare_commit_graph()` to return the prepared
commit graph, if any. Like this, callers are expected to call that
function and then use the returned commit graph.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
