<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pub/scm/git/git.git/commit-graph.c, branch master</title>
<subtitle>Git source code mirror</subtitle>
<id>http://kernel.varnish.org/pub/scm/git/git.git/atom/commit-graph.c?h=master</id>
<link rel='self' href='http://kernel.varnish.org/pub/scm/git/git.git/atom/commit-graph.c?h=master'/>
<link rel='alternate' type='text/html' href='http://kernel.varnish.org/pub/scm/git/git.git/'/>
<updated>2026-08-17T16:36:10Z</updated>
<entry>
<title>odb: eagerly initialize alternates</title>
<updated>2026-08-17T16:36:10Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-08-17T11:09:23Z</published>
<link rel='alternate' type='text/html' href='http://kernel.varnish.org/pub/scm/git/git.git/commit/?id=f978f560dd7f0c92ed1834198747da621400350a'/>
<id>urn:sha1:f978f560dd7f0c92ed1834198747da621400350a</id>
<content type='text'>
When creating the object database we initialize the main object database
source, but we don't yet initialize its alternates. Instead, we have
many calls to `odb_prepare_alternates()` cluttered around the code base
whenever we are about to iterate through the sources.

This lazy loading doesn't really add much value: the moment where we
read any object we _have_ to load the alternates anyway. So given that
most of our commands would access the object database this optimization
is not really buying us much in the first place. Quite on the contrary,
it makes the code harder to understand and is a potential source of bugs
in case any callsite forgot to prepare alternates before we iterate
through the sources.

Historically though there was a reason why we deferred lazy-loading: it
may happen that the repository has "core.ignoreCase" configured, and we
use that to deduplicate the list of alternates in case we had the same
alternate configured multiple times, but with different casing. We used
to initialize the object database before we had fully configured the
owning repository though, and consequently we couldn't access that
configuration yet. This has changed in the preceding commit though where
we started to parse "core.ignoreCase" manually.

Eagerly prepare alternates both when creating the object database and
when flushing its caches. Drop the now-unneeded calls to prepare the
alternates that are scattered across the code base.

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 'rs/tempfile-wo-the-repository'</title>
<updated>2026-07-30T17:32:02Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-07-30T17:32:02Z</published>
<link rel='alternate' type='text/html' href='http://kernel.varnish.org/pub/scm/git/git.git/commit/?id=818eb57007db6a492346e65b365609f0072891e2'/>
<id>urn:sha1:818eb57007db6a492346e65b365609f0072891e2</id>
<content type='text'>
The tempfile and lockfile APIs have been refactored to stop depending
on the 'the_repository' global variable, and their callers have been
updated to use the repository-aware variants.

* rs/tempfile-wo-the-repository:
  use repo_hold_lock_file_for_update{,_mode,_timeout}() with custom repos
  tempfile: stop using the_repository
  lockfile: add repo_hold_lock_file_for_update{,_timeout}{,_mode}()
  refs/packed: use repo_create_tempfile()
  tempfile: add repo_create_tempfile{,_mode}()
</content>
</entry>
<entry>
<title>Merge branch 'kk/commit-graph-topo-levels-fix'</title>
<updated>2026-07-19T17:42:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-07-19T17:42:19Z</published>
<link rel='alternate' type='text/html' href='http://kernel.varnish.org/pub/scm/git/git.git/commit/?id=82c60a874d777233f5e1e97c8be7c3f47b22560e'/>
<id>urn:sha1:82c60a874d777233f5e1e97c8be7c3f47b22560e</id>
<content type='text'>
The 'topo_levels' slab was propagated only to the topmost layer of a
split commit-graph chain, causing topological levels for commits in
base layers to be recomputed during incremental writes.  This has been
corrected.

* kk/commit-graph-topo-levels-fix:
  commit-graph: propagate topo_levels slab to all chain layers
  commit-graph: add trace2 instrumentation for generation DFS
</content>
</entry>
<entry>
<title>use repo_hold_lock_file_for_update{,_mode,_timeout}() with custom repos</title>
<updated>2026-07-14T19:54:25Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2026-07-14T17:59:56Z</published>
<link rel='alternate' type='text/html' href='http://kernel.varnish.org/pub/scm/git/git.git/commit/?id=2e486bfbf75c5098406a07e6967ecb80a28c316a'/>
<id>urn:sha1:2e486bfbf75c5098406a07e6967ecb80a28c316a</id>
<content type='text'>
Apply the config setting core.sharedRepository from the repository at
hand instead of from the_repository.

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>commit-graph: propagate topo_levels slab to all chain layers</title>
<updated>2026-07-09T17:29:23Z</updated>
<author>
<name>Kristofer Karlsson</name>
<email>krka@spotify.com</email>
</author>
<published>2026-07-09T15:03:01Z</published>
<link rel='alternate' type='text/html' href='http://kernel.varnish.org/pub/scm/git/git.git/commit/?id=8ea36f63d8e63350325705afef885ae215e64217'/>
<id>urn:sha1:8ea36f63d8e63350325705afef885ae215e64217</id>
<content type='text'>
The topo_levels slab is only propagated to the topmost graph
layer instead of all layers in the chain.  Commits from lower
layers appear to have no generation numbers, so the DFS
re-walks the entire ancestry.

Fix by making topo_levels visible to all layers, not just
the first one.

Signed-off-by: Kristofer Karlsson &lt;krka@spotify.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit-graph: add trace2 instrumentation for generation DFS</title>
<updated>2026-07-09T17:29:23Z</updated>
<author>
<name>Kristofer Karlsson</name>
<email>krka@spotify.com</email>
</author>
<published>2026-07-09T15:03:00Z</published>
<link rel='alternate' type='text/html' href='http://kernel.varnish.org/pub/scm/git/git.git/commit/?id=02d62c33be04260445fb201fc65769f421324ed0'/>
<id>urn:sha1:02d62c33be04260445fb201fc65769f421324ed0</id>
<content type='text'>
Count the number of steps taken in
compute_reachable_generation_numbers() and expose it via
trace2 to make it easier to detect performance regressions.

Add a failing test for such a regression, introduced in
199d452758 (commit-graph: return the prepared commit graph
from `prepare_commit_graph()`, 2025-09-04), where incremental
commit-graph writes do not see existing generation numbers
from lower graph layers and fall back to walking the full
ancestry.

Signed-off-by: Kristofer Karlsson &lt;krka@spotify.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ps/odb-source-packed'</title>
<updated>2026-07-06T22:50:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-07-06T22:50:21Z</published>
<link rel='alternate' type='text/html' href='http://kernel.varnish.org/pub/scm/git/git.git/commit/?id=a7f8e847722a398fd523f61931bf35b8bb5f4664'/>
<id>urn:sha1:a7f8e847722a398fd523f61931bf35b8bb5f4664</id>
<content type='text'>
The packed object source has been refactored into a proper struct
odb_source.

* ps/odb-source-packed:
  odb/source-packed: drop pointer to "files" parent source
  midx: refactor interfaces to work on "packed" source
  odb/source-packed: stub out remaining functions
  odb/source-packed: wire up `freshen_object()` callback
  odb/source-packed: wire up `find_abbrev_len()` callback
  odb/source-packed: wire up `count_objects()` callback
  odb/source-packed: wire up `for_each_object()` callback
  odb/source-packed: wire up `read_object_stream()` callback
  odb/source-packed: wire up `read_object_info()` callback
  packfile: use higher-level interface to implement `has_object_pack()`
  odb/source-packed: wire up `reprepare()` callback
  odb/source-packed: wire up `close()` callback
  odb/source-packed: start converting to a proper `struct odb_source`
  odb/source-packed: store pointer to "files" instead of generic source
  packfile: move packed source into "odb/" subsystem
  packfile: split out packfile list logic
  packfile: rename `struct packfile_store` to `odb_source_packed`
</content>
</entry>
<entry>
<title>packfile: thread odb_source_packed through packed_object_info()</title>
<updated>2026-07-02T16:52:32Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-07-02T12:01:59Z</published>
<link rel='alternate' type='text/html' href='http://kernel.varnish.org/pub/scm/git/git.git/commit/?id=11c689b8730e0927ef9fc73eea59270318b3177d'/>
<id>urn:sha1:11c689b8730e0927ef9fc73eea59270318b3177d</id>
<content type='text'>
Add an optional `struct odb_source_packed *source` parameter to
`packed_object_info()` and `packed_object_info_with_index_pos()`. This
parameter is unused at this point in time, but it will be used in a
follow-up commit so that we can record the source of a specific object.

Note that callers in "odb/source-packed.c" pass the already-available
source, but all other callers pass `NULL` instead. This is fine though,
as we only care about populating this info when called via the packed
store.

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/odb-source-packed' into ps/odb-drop-whence</title>
<updated>2026-06-24T17:12:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-06-24T17:12:12Z</published>
<link rel='alternate' type='text/html' href='http://kernel.varnish.org/pub/scm/git/git.git/commit/?id=2ed34f72cf957f70b5919afac2f5e7aa2563c573'/>
<id>urn:sha1:2ed34f72cf957f70b5919afac2f5e7aa2563c573</id>
<content type='text'>
* ps/odb-source-packed:
  odb/source-packed: drop pointer to "files" parent source
  midx: refactor interfaces to work on "packed" source
  odb/source-packed: stub out remaining functions
  odb/source-packed: wire up `freshen_object()` callback
  odb/source-packed: wire up `find_abbrev_len()` callback
  odb/source-packed: wire up `count_objects()` callback
  odb/source-packed: wire up `for_each_object()` callback
  odb/source-packed: wire up `read_object_stream()` callback
  odb/source-packed: wire up `read_object_info()` callback
  packfile: use higher-level interface to implement `has_object_pack()`
  odb/source-packed: wire up `reprepare()` callback
  odb/source-packed: wire up `close()` callback
  odb/source-packed: start converting to a proper `struct odb_source`
  odb/source-packed: store pointer to "files" instead of generic source
  packfile: move packed source into "odb/" subsystem
  packfile: split out packfile list logic
  packfile: rename `struct packfile_store` to `odb_source_packed`
</content>
</entry>
<entry>
<title>Merge branch 'en/commit-graph-timestamp-fix'</title>
<updated>2026-06-17T18:10:12Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-06-17T18:10:12Z</published>
<link rel='alternate' type='text/html' href='http://kernel.varnish.org/pub/scm/git/git.git/commit/?id=8632b5c49d722f7c0b39f6da7e9868915d5c42e4'/>
<id>urn:sha1:8632b5c49d722f7c0b39f6da7e9868915d5c42e4</id>
<content type='text'>
compute_reachable_generation_numbers() in commit-graph used a 32-bit
integer to accumulate parent generations, which is OK for generation
number v1 (topological levels), but with generation number v2
(adjusted committer timestamps), it truncated timestamps beyond
2106.  Fixed by widening the accumulator to timestamp_t.

* en/commit-graph-timestamp-fix:
  commit-graph: use timestamp_t for max parent generation accumulator
</content>
</entry>
</feed>
