Git development
 help / color / mirror / Atom feed
* [PATCH 0/7] odb: unify read and write streams
@ 2026-08-04  7:25 Patrick Steinhardt
  2026-08-04  7:25 ` [PATCH 1/7] odb/streaming: track write stream size in the structure Patrick Steinhardt
                   ` (7 more replies)
  0 siblings, 8 replies; 27+ messages in thread
From: Patrick Steinhardt @ 2026-08-04  7:25 UTC (permalink / raw)
  To: git

Hi,

we have two different kind of object database streams in our code base:
`odb_write_stream` and `odb_read_stream`. While those are used for
different use cases, the provided functionality is ultimately the exact
same.

This patch series thus refactors these streams so that we have a single
`odb_stream`, only. This allows us to reuse the streams for different
kinds of purposes and makes them more generally useful overall. For
example, it's trivially possible now to create an object stream for any
given object and then write that stream into a different source.

The series is built on top of 5b2471720c (The 10th batch, 2026-08-03).

Thanks!

Patrick

---
Patrick Steinhardt (7):
      odb/streaming: track write stream size in the structure
      odb/streaming: drop `is_finished` field
      odb/streaming: support streaming arbitrary object types
      odb/streaming: rename `struct odb_read_stream`
      odb/streaming: consolidate read and write streams
      odb/streaming: rename `struct read_object_fd_data`
      odb/streaming: unify function names to create new streams

 archive-tar.c                 |   8 ++--
 archive-zip.c                 |  12 ++---
 builtin/index-pack.c          |   8 ++--
 builtin/pack-objects.c        |  18 ++++----
 builtin/unpack-objects.c      |  42 +++++++++--------
 object-file.c                 |  76 +++++++++++++++---------------
 object-file.h                 |   2 +-
 object.c                      |   6 +--
 odb.c                         |   4 +-
 odb.h                         |   4 +-
 odb/source-files.c            |   7 ++-
 odb/source-inmemory.c         |  32 +++++++------
 odb/source-loose.c            |  33 ++++++++------
 odb/source-packed.c           |   5 +-
 odb/source.h                  |  13 +++---
 odb/streaming.c               | 104 ++++++++++++++++++++----------------------
 odb/streaming.h               |  69 ++++++++++------------------
 odb/transaction.c             |   6 +--
 odb/transaction.h             |   6 +--
 pack-check.c                  |   4 +-
 packfile.c                    |   8 ++--
 packfile.h                    |   4 +-
 t/unit-tests/u-odb-inmemory.c |  37 ++++++++-------
 23 files changed, 247 insertions(+), 261 deletions(-)


---
base-commit: 5b2471720c93ee30e5764a19f3d3b3ae9ec9712a
change-id: 20260724-pks-odb-stream-unification-334dc2a75888


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2026-08-05  7:45 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-04  7:25 [PATCH 0/7] odb: unify read and write streams Patrick Steinhardt
2026-08-04  7:25 ` [PATCH 1/7] odb/streaming: track write stream size in the structure Patrick Steinhardt
2026-08-04 16:47   ` Justin Tobler
2026-08-04  7:25 ` [PATCH 2/7] odb/streaming: drop `is_finished` field Patrick Steinhardt
2026-08-04 17:46   ` Justin Tobler
2026-08-04  7:25 ` [PATCH 3/7] odb/streaming: support streaming arbitrary object types Patrick Steinhardt
2026-08-04 18:03   ` Justin Tobler
2026-08-05  6:06     ` Patrick Steinhardt
2026-08-04 18:54   ` Junio C Hamano
2026-08-05  6:06     ` Patrick Steinhardt
2026-08-04  7:25 ` [PATCH 4/7] odb/streaming: rename `struct odb_read_stream` Patrick Steinhardt
2026-08-04  7:25 ` [PATCH 5/7] odb/streaming: consolidate read and write streams Patrick Steinhardt
2026-08-04 18:23   ` Justin Tobler
2026-08-05  6:06     ` Patrick Steinhardt
2026-08-04  7:25 ` [PATCH 6/7] odb/streaming: rename `struct read_object_fd_data` Patrick Steinhardt
2026-08-04 18:25   ` Justin Tobler
2026-08-04  7:25 ` [PATCH 7/7] odb/streaming: unify function names to create new streams Patrick Steinhardt
2026-08-04 18:30   ` Justin Tobler
2026-08-05  7:44 ` [PATCH v2 0/8] odb: unify read and write streams Patrick Steinhardt
2026-08-05  7:44   ` [PATCH v2 1/8] odb/streaming: track write stream size in the structure Patrick Steinhardt
2026-08-05  7:44   ` [PATCH v2 2/8] odb/streaming: drop `is_finished` field Patrick Steinhardt
2026-08-05  7:44   ` [PATCH v2 3/8] odb/streaming: support streaming arbitrary object types Patrick Steinhardt
2026-08-05  7:44   ` [PATCH v2 4/8] odb/streaming: rename `struct odb_read_stream` Patrick Steinhardt
2026-08-05  7:44   ` [PATCH v2 5/8] odb/streaming: consolidate read and write streams Patrick Steinhardt
2026-08-05  7:44   ` [PATCH v2 6/8] odb/streaming: rename `struct read_object_fd_data` Patrick Steinhardt
2026-08-05  7:44   ` [PATCH v2 7/8] odb/streaming: rename `struct input_zstream_data` Patrick Steinhardt
2026-08-05  7:44   ` [PATCH v2 8/8] odb/streaming: unify function names to create new streams Patrick Steinhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox