<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/object-name.c, branch v2.51.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.51.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.51.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2025-10-15T17:29:33Z</updated>
<entry>
<title>Merge branch 'rs/object-name-extend-abbrev-len-update' into maint-2.51</title>
<updated>2025-10-15T17:29:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-10-15T17:29:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6d1f4859e1b446bcfcd3bf8849c4e9d650ce1bd9'/>
<id>urn:sha1:6d1f4859e1b446bcfcd3bf8849c4e9d650ce1bd9</id>
<content type='text'>
Code clean-up.

* rs/object-name-extend-abbrev-len-update:
  object-name: declare pointer type of extend_abbrev_len()'s 2nd parameter
</content>
</entry>
<entry>
<title>object-name: declare pointer type of extend_abbrev_len()'s 2nd parameter</title>
<updated>2025-09-04T20:25:46Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2025-09-04T17:58:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=069c15d256ed5308d09a7a16d64c8af2416bed58'/>
<id>urn:sha1:069c15d256ed5308d09a7a16d64c8af2416bed58</id>
<content type='text'>
Expose the expected type of the second parameter of extend_abbrev_len()
instead of casting a void pointer internally.  Just a single caller
passes in a void pointer, the rest pass the correct type.  Let the
compiler help keeping it that way.

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>Merge branch 'ps/object-store-midx'</title>
<updated>2025-08-04T01:44:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-08-04T01:44:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=733b640d5099df783f28ddf8ce35749b8c53f206'/>
<id>urn:sha1:733b640d5099df783f28ddf8ce35749b8c53f206</id>
<content type='text'>
Redefine where the multi-pack-index sits in the object subsystem,
which recently was restructured to allow multiple backends that
support a single object source that belongs to one repository.  A
midx does span mulitple "object sources".

* ps/object-store-midx:
  midx: remove now-unused linked list of multi-pack indices
  packfile: stop using linked MIDX list in `get_all_packs()`
  packfile: stop using linked MIDX list in `find_pack_entry()`
  packfile: refactor `get_multi_pack_index()` to work on sources
  midx: stop using linked list when closing MIDX
  packfile: refactor `prepare_packed_git_one()` to work on sources
  midx: start tracking per object database source
</content>
</entry>
<entry>
<title>Merge branch 'rs/pop-recent-commit-with-prio-queue'</title>
<updated>2025-07-28T19:02:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-07-28T19:02:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0f6e5037d40db4768e8b61aea22c68c9711ce544'/>
<id>urn:sha1:0f6e5037d40db4768e8b61aea22c68c9711ce544</id>
<content type='text'>
The pop_most_recent_commit() function can have quite expensive
worst case performance characteristics, which has been optimized by
using prio-queue data structure.

* rs/pop-recent-commit-with-prio-queue:
  commit: use prio_queue_replace() in pop_most_recent_commit()
  prio-queue: add prio_queue_replace()
  commit: convert pop_most_recent_commit() to prio_queue
</content>
</entry>
<entry>
<title>commit: convert pop_most_recent_commit() to prio_queue</title>
<updated>2025-07-22T14:28:23Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2025-07-18T09:39:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d6ec08788e667d4f556e9c2d97bbd7adb7e582be'/>
<id>urn:sha1:d6ec08788e667d4f556e9c2d97bbd7adb7e582be</id>
<content type='text'>
pop_most_recent_commit() calls commit_list_insert_by_date() for parent
commits, which is itself called in a loop.  This can lead to quadratic
complexity if there are many merges.  Replace the commit_list with a
prio_queue to ensure logarithmic worst case complexity and convert all
three users.

Add a performance test that exercises one of them using a pathological
history that consists of 50% merges and 50% root commits to demonstrate
the speedup:

Test                          v2.50.1           HEAD
----------------------------------------------------------------------
1501.2: rev-parse ':/65535'   2.48(2.47+0.00)   0.20(0.19+0.00) -91.9%

Alas, sane histories don't benefit from the conversion much, and
traversing Git's own history takes a 1% performance hit on my machine:

   $ hyperfine -w3 -L git ./git_2.50.1,./git '{git} rev-parse :/^Initial.revision'
   Benchmark 1: ./git_2.50.1 rev-parse :/^Initial.revision
     Time (mean ± σ):      1.071 s ±  0.004 s    [User: 1.052 s, System: 0.017 s]
     Range (min … max):    1.067 s …  1.078 s    10 runs

   Benchmark 2: ./git rev-parse :/^Initial.revision
     Time (mean ± σ):      1.079 s ±  0.003 s    [User: 1.060 s, System: 0.017 s]
     Range (min … max):    1.074 s …  1.083 s    10 runs

   Summary
     ./git_2.50.1 rev-parse :/^Initial.revision ran
       1.01 ± 0.00 times faster than ./git rev-parse :/^Initial.revision

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>Merge branch 'ps/object-store'</title>
<updated>2025-07-15T22:18:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-07-15T22:18:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=51b50c55a93205e8cf427a9c5f9c489c6b468542'/>
<id>urn:sha1:51b50c55a93205e8cf427a9c5f9c489c6b468542</id>
<content type='text'>
Code clean-up around object access API.

* ps/object-store:
  odb: rename `read_object_with_reference()`
  odb: rename `pretend_object_file()`
  odb: rename `has_object()`
  odb: rename `repo_read_object_file()`
  odb: rename `oid_object_info()`
  odb: trivial refactorings to get rid of `the_repository`
  odb: get rid of `the_repository` when handling submodule sources
  odb: get rid of `the_repository` when handling the primary source
  odb: get rid of `the_repository` in `for_each()` functions
  odb: get rid of `the_repository` when handling alternates
  odb: get rid of `the_repository` in `odb_mkstemp()`
  odb: get rid of `the_repository` in `assert_oid_type()`
  odb: get rid of `the_repository` in `find_odb()`
  odb: introduce parent pointers
  object-store: rename files to "odb.{c,h}"
  object-store: rename `object_directory` to `odb_source`
  object-store: rename `raw_object_store` to `object_database`
</content>
</entry>
<entry>
<title>packfile: refactor `get_multi_pack_index()` to work on sources</title>
<updated>2025-07-15T19:07:29Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-07-15T11:29:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=736bb725ebcd37d567455db2ac50524dea11223c'/>
<id>urn:sha1:736bb725ebcd37d567455db2ac50524dea11223c</id>
<content type='text'>
The function `get_multi_pack_index()` loads multi-pack indices via
`prepare_packed_git()` and then returns the linked list of multi-pack
indices that is stored in `struct object_database`. That list is in the
process of being removed though in favor of storing the MIDX as part of
the object database source it belongs to.

Refactor `get_multi_pack_index()` so that it returns the multi-pack
index for a single object source. Callers are now expected to call this
function for each source they are interested in. This requires them to
iterate through alternates, so we have to prepare alternate object
sources before doing so.

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/object-store' into ps/object-store-midx</title>
<updated>2025-07-09T15:29:08Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-07-09T15:29:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=db0583b3fd18596b8e360b0fd1554ac3e5c15793'/>
<id>urn:sha1:db0583b3fd18596b8e360b0fd1554ac3e5c15793</id>
<content type='text'>
* ps/object-store:
  odb: rename `read_object_with_reference()`
  odb: rename `pretend_object_file()`
  odb: rename `has_object()`
  odb: rename `repo_read_object_file()`
  odb: rename `oid_object_info()`
  odb: trivial refactorings to get rid of `the_repository`
  odb: get rid of `the_repository` when handling submodule sources
  odb: get rid of `the_repository` when handling the primary source
  odb: get rid of `the_repository` in `for_each()` functions
  odb: get rid of `the_repository` when handling alternates
  odb: get rid of `the_repository` in `odb_mkstemp()`
  odb: get rid of `the_repository` in `assert_oid_type()`
  odb: get rid of `the_repository` in `find_odb()`
  odb: introduce parent pointers
  object-store: rename files to "odb.{c,h}"
  object-store: rename `object_directory` to `odb_source`
  object-store: rename `raw_object_store` to `object_database`
</content>
</entry>
<entry>
<title>odb: rename `oid_object_info()`</title>
<updated>2025-07-01T21:46:37Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-07-01T12:22:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e989dd96b8aa9b20b0e23d3fa845d0baba1b454a'/>
<id>urn:sha1:e989dd96b8aa9b20b0e23d3fa845d0baba1b454a</id>
<content type='text'>
Rename `oid_object_info()` to `odb_read_object_info()` as well as their
`_extended()` variant to match other functions related to the object
database and our modern coding guidelines.

Introduce compatibility wrappers so that any in-flight topics will
continue to compile.

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>odb: get rid of `the_repository` when handling alternates</title>
<updated>2025-07-01T21:46:36Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-07-01T12:22:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c44185f6c10fb2d306efe505112982a7c3b93789'/>
<id>urn:sha1:c44185f6c10fb2d306efe505112982a7c3b93789</id>
<content type='text'>
The functions to manage alternates all depend on `the_repository`.
Refactor them to accept an object database as a parameter and adjust all
callers. The functions are renamed accordingly.

Note that right now the situation is still somewhat weird because we end
up using the object store path provided by the object store's repository
anyway. Consequently, we could have instead passed in a pointer to the
repository instead of passing in the pointer to the object store. This
will be addressed in subsequent commits though, where we will start to
use the path owned by the object store itself.

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