Git development
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 4/7] builtin: expose the object storage format
Date: Tue, 20 Oct 2026 10:50:13 +0200	[thread overview]
Message-ID: <atcrRWX2-S9374Sy@pks.im> (raw)
In-Reply-To: <CAOLa=ZQ1E5sg05++KCXgbM9+=4=vFeCHU-5iMbNEGRuS-8+aPg@mail.gmail.com>

On Mon, Oct 19, 2026 at 02:40:31PM -0700, Karthik Nayak wrote:
> Patrick Steinhardt <ps@pks.im> writes:
> > diff --git a/Documentation/git-repo.adoc b/Documentation/git-repo.adoc
> > index cb8c1e7292..d2dc9b7a69 100644
> > --- a/Documentation/git-repo.adoc
> > +++ b/Documentation/git-repo.adoc
> > @@ -105,6 +105,12 @@ values that they return:
> >  `object.format`::
> >  	The object format (hash algorithm) used in the repository.
> >
> > +`objects.storageFormat`::
> > +	The object storage format used in the repository, as configured via
> > +	`extensions.objectStorage`. The valid values are:
> > ++
> 
> The nuance between `object` above and `objects` here is too little and
> can be confusing. But there's nothing we can really do here.

Yeah, I'm not a fan of this, either. It used to be even worse than that,
because we had "references.format" which was giving us information about
the backend that our refs use. And that's why I recently sent the patch
series to rename "ref format" to "ref storage format", so that we can
avoid this conflict here.

It's still not perfect to have both "object.format" and
"objects.storageFormat". I was wondering whether we also want to rename
"object.format" to "objects.format" to at least have the prefix match.
But I shied away from that.

> > diff --git a/builtin/repo.c b/builtin/repo.c
> > index 84e012f83f..da11a56ede 100644
> > --- a/builtin/repo.c
> > +++ b/builtin/repo.c
> > @@ -128,11 +129,20 @@ static int get_references_format(struct repository *repo, struct strbuf *buf)
> >  	return 0;
> >  }
> >
> > +static int get_object_storage_format(struct repository *repo, struct strbuf *buf)
> > +{
> > +	strbuf_addstr(buf, repo->object_storage_format ?
> > +		      repo->object_storage_format :
> > +		      odb_source_type_to_name(ODB_SOURCE_FILES));
> > +	return 0;
> > +}
> 
> Is there a reason why `repo->object_storage_format` won't be set, I
> don't like the fact that we have to expose the default object storage
> format outside the repository and odb subsystem.

Hmm, not really, and I agree that this creates some awkwardness. I'll
have a look at whether I can fix that.

Patrick

  reply	other threads:[~2026-10-20  8:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19  8:55 [PATCH 0/7] odb: introduce object storage extension Patrick Steinhardt
2026-10-19  8:55 ` [PATCH 1/7] loose: drop unused `repo_write_loose_object_map()` Patrick Steinhardt
2026-10-19 20:21   ` Karthik Nayak
2026-10-20  8:49     ` Patrick Steinhardt
2026-10-20 18:30       ` Karthik Nayak
2026-10-19  8:55 ` [PATCH 2/7] setup: introduce object storage extension Patrick Steinhardt
2026-10-19 21:29   ` Karthik Nayak
2026-10-20  1:27     ` Junio C Hamano
2026-10-20 18:32       ` Karthik Nayak
2026-10-20  8:50     ` Patrick Steinhardt
2026-10-20 19:06       ` Karthik Nayak
2026-10-19  8:55 ` [PATCH 3/7] setup: allow overriding object storage format via environment Patrick Steinhardt
2026-10-19 21:34   ` Karthik Nayak
2026-10-20  8:50     ` Patrick Steinhardt
2026-10-20 19:08       ` Karthik Nayak
2026-10-19  8:55 ` [PATCH 4/7] builtin: expose the object storage format Patrick Steinhardt
2026-10-19 21:40   ` Karthik Nayak
2026-10-20  8:50     ` Patrick Steinhardt [this message]
2026-10-20 19:10       ` Karthik Nayak
2026-10-19  8:56 ` [PATCH 5/7] builtin/init: introduce handling of " Patrick Steinhardt
2026-10-19  8:56 ` [PATCH 6/7] builtin/clone: introduce "--object-storage-format=" Patrick Steinhardt
2026-10-19  8:56 ` [PATCH 7/7] builtin/submodule: propagate "--object-storage-format=" Patrick Steinhardt

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=atcrRWX2-S9374Sy@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=karthik.188@gmail.com \
    /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