Git development
 help / color / mirror / Atom feed
From: Justin Tobler <jltobler@gmail.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/6] packfile: thread odb_source_packed through packed_object_info()
Date: Mon, 29 Jun 2026 12:01:47 -0500	[thread overview]
Message-ID: <akKge0zmT3WSfdyz@denethor> (raw)
In-Reply-To: <20260624-b4-pks-odb-drop-whence-v1-1-8d1877b790ac@pks.im>

On 26/06/24 02:19PM, Patrick Steinhardt wrote:
> 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.

Ok so `packed_object_info()` is responsible for populating `struct
object_info` from the provided packfile and object offset. By
additionally providing the object source, the ultimate goal is to store
the this information in `struct object_info` or some equivalent
structure.

At first, I wondered if it would make more sense for `struct packed_git`
to record the `struct odb_source_packed` it comes from, but maybe that
wouldn't be the best layer to handle this bookkeeping?

> 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.

Hmmm, is this because knowing the ODB source the object comes from is
only useful for callers from in "odb/source-packed.c"? Maybe this will
become a bit more clear to me in subsequent patches.

The patch itself is just wiring up `struct odb_source_packed` to the
above mentioned functions, but doesn't do anything yet with them. This
step looks trivially correct though.

-Justin

  reply	other threads:[~2026-06-29 17:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-24 12:19 [PATCH 0/6] odb: refactor source-specific information in object info Patrick Steinhardt
2026-06-24 12:19 ` [PATCH 1/6] packfile: thread odb_source_packed through packed_object_info() Patrick Steinhardt
2026-06-29 17:01   ` Justin Tobler [this message]
2026-06-24 12:19 ` [PATCH 2/6] odb: make backend-specific fields optional Patrick Steinhardt
2026-06-29 17:25   ` Justin Tobler
2026-06-24 12:19 ` [PATCH 3/6] odb: add `source` field to struct object_info_source Patrick Steinhardt
2026-06-29 17:49   ` Justin Tobler
2026-06-24 12:19 ` [PATCH 4/6] treewide: convert users of `whence` to the new source field Patrick Steinhardt
2026-06-29 17:55   ` Justin Tobler
2026-06-24 12:19 ` [PATCH 5/6] odb: drop `whence` field from object info Patrick Steinhardt
2026-06-29 17:57   ` Justin Tobler
2026-06-24 12:19 ` [PATCH 6/6] odb: document object info fields Patrick Steinhardt
2026-06-24 17:13 ` [PATCH 0/6] odb: refactor source-specific information in object info Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=akKge0zmT3WSfdyz@denethor \
    --to=jltobler@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox