<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/odb, branch jch</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=jch</id>
<link rel='self' href='https://git.shady.money/git/atom?h=jch'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2026-05-17T13:58:49Z</updated>
<entry>
<title>Merge branch 'ps/odb-in-memory' into jch</title>
<updated>2026-05-17T13:58:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-05-17T13:58:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bde06d0ab28301b38fee4ec67d9ae2a0b7d08f25'/>
<id>urn:sha1:bde06d0ab28301b38fee4ec67d9ae2a0b7d08f25</id>
<content type='text'>
Add a new odb "in-memory" source that is meant to only hold
tentative objects (like the virtual blob object that represents the
working tree file used by "git blame").

* ps/odb-in-memory:
  t/unit-tests: add tests for the in-memory object source
  odb: generic in-memory source
  odb/source-inmemory: stub out remaining functions
  odb/source-inmemory: implement `freshen_object()` callback
  odb/source-inmemory: implement `count_objects()` callback
  odb/source-inmemory: implement `find_abbrev_len()` callback
  odb/source-inmemory: implement `for_each_object()` callback
  odb/source-inmemory: convert to use oidtree
  oidtree: add ability to store data
  cbtree: allow using arbitrary wrapper structures for nodes
  odb/source-inmemory: implement `write_object_stream()` callback
  odb/source-inmemory: implement `write_object()` callback
  odb/source-inmemory: implement `read_object_stream()` callback
  odb/source-inmemory: implement `read_object_info()` callback
  odb: fix unnecessary call to `find_cached_object()`
  odb/source-inmemory: implement `free()` callback
  odb: introduce "in-memory" source
</content>
</entry>
<entry>
<title>Merge branch 'jt/odb-transaction-write' into jch</title>
<updated>2026-05-17T13:58:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2026-05-17T13:58:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9465e7902b82b1a46a41eef3231906fb437c9228'/>
<id>urn:sha1:9465e7902b82b1a46a41eef3231906fb437c9228</id>
<content type='text'>
ODB transaction interface is being reworked to explicitly handle
object writes.

* jt/odb-transaction-write:
  odb/transaction: make `write_object_stream()` pluggable
  object-file: generalize packfile writes to use odb_write_stream
  object-file: avoid fd seekback by checking object size upfront
  object-file: remove flags from transaction packfile writes
  odb: update `struct odb_write_stream` read() callback
  odb/transaction: use pluggable `begin_transaction()`
  odb: split `struct odb_transaction` into separate header
</content>
</entry>
<entry>
<title>odb/source-inmemory: stub out remaining functions</title>
<updated>2026-05-14T19:50:45Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-04-10T12:12:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=314fa0199ddc1a37069ab7c006a5b0bb8e72f45d'/>
<id>urn:sha1:314fa0199ddc1a37069ab7c006a5b0bb8e72f45d</id>
<content type='text'>
Stub out remaining functions that we either don't need or that are
basically no-ops.

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/source-inmemory: implement `freshen_object()` callback</title>
<updated>2026-05-14T19:50:45Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-04-10T12:12:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7357196c49d537588d6c450fa3a902fac13cfbb9'/>
<id>urn:sha1:7357196c49d537588d6c450fa3a902fac13cfbb9</id>
<content type='text'>
Implement the `freshen_object()` callback function for the in-memory
source.

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/source-inmemory: implement `count_objects()` callback</title>
<updated>2026-05-14T19:50:45Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-04-10T12:12:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=27d219132afe13db43d9732caeb37a14c026e717'/>
<id>urn:sha1:27d219132afe13db43d9732caeb37a14c026e717</id>
<content type='text'>
Implement the `count_objects()` callback function for the in-memory
source.

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/source-inmemory: implement `find_abbrev_len()` callback</title>
<updated>2026-05-14T19:50:45Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-04-10T12:12:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3bd2856d3448943c4037d454f3e9cc0135330e73'/>
<id>urn:sha1:3bd2856d3448943c4037d454f3e9cc0135330e73</id>
<content type='text'>
Implement the `find_abbrev_len()` callback function for the in-memory
source.

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/source-inmemory: implement `for_each_object()` callback</title>
<updated>2026-05-14T19:50:45Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-04-10T12:12:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4babe3b673882adf853526475192ae7e3007877c'/>
<id>urn:sha1:4babe3b673882adf853526475192ae7e3007877c</id>
<content type='text'>
Implement the `for_each_object()` callback function for the in-memory
source.

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/source-inmemory: convert to use oidtree</title>
<updated>2026-05-14T19:50:45Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-04-10T12:12:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c04907694601556de0ce862ad4f80fc55ec38c62'/>
<id>urn:sha1:c04907694601556de0ce862ad4f80fc55ec38c62</id>
<content type='text'>
The in-memory source stores its objects in a simple array that we grow as
needed. This has a couple of downsides:

  - The object lookup is O(n). This doesn't matter in practice because
    we only store a small number of objects.

  - We don't have an easy way to iterate over all objects in
    lexicographic order.

  - We don't have an easy way to compute unique object ID prefixes.

Refactor the code to use an oidtree instead. This is the same data
structure used by our loose object source, and thus it means we get a
bunch of functionality for free.

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/source-inmemory: implement `write_object_stream()` callback</title>
<updated>2026-05-14T19:50:45Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-04-10T12:12:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=197c8a85e37720e54afda1ed92bf8b393cca92f1'/>
<id>urn:sha1:197c8a85e37720e54afda1ed92bf8b393cca92f1</id>
<content type='text'>
Implement the `write_object_stream()` callback function for the in-memory
source.

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/source-inmemory: implement `write_object()` callback</title>
<updated>2026-05-14T19:50:44Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2026-04-10T12:12:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f611f4ba41de07a89649c74c01477cf55b20bc31'/>
<id>urn:sha1:f611f4ba41de07a89649c74c01477cf55b20bc31</id>
<content type='text'>
Implement the `write_object()` callback function for the in-memory
source.

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