git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 4/7] builtin: expose the object storage format

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 20, 2026, 08:50 UTC
Message-ID
<atcrRWX2-S9374Sy@pks.im>
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:
Show 16 quoted lines
> 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.

Show 19 quoted lines
> > 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
Previous: Karthik NayakNext: Karthik Nayak
Message 18 of 59 in “odb: introduce object storage extension”
  1. 0/7 odb: introduce object storage extensionPatrick Steinhardt, Oct 19, 2026
  2. 1/7 loose: drop unused `repo_write_loose_object_map()`Patrick Steinhardt, Oct 19, 2026
  3. Karthik NayakOct 19, 2026
  4. Patrick SteinhardtOct 20, 2026
  5. Karthik NayakOct 20, 2026
  6. 2/7 setup: introduce object storage extensionPatrick Steinhardt, Oct 19, 2026
  7. Karthik NayakOct 19, 2026
  8. Junio C HamanoOct 20, 2026
  9. Karthik NayakOct 20, 2026
  10. Patrick SteinhardtOct 20, 2026
  11. Karthik NayakOct 20, 2026
  12. 3/7 setup: allow overriding object storage format via environmentPatrick Steinhardt, Oct 19, 2026
  13. Karthik NayakOct 19, 2026
  14. Patrick SteinhardtOct 20, 2026
  15. Karthik NayakOct 20, 2026
  16. 4/7 builtin: expose the object storage formatPatrick Steinhardt, Oct 19, 2026
  17. Karthik NayakOct 19, 2026
  18. Patrick SteinhardtOct 20, 2026
  19. Karthik NayakOct 20, 2026
  20. 5/7 builtin/init: introduce handling of object storage formatPatrick Steinhardt, Oct 19, 2026
  21. 6/7 builtin/clone: introduce "--object-storage-format="Patrick Steinhardt, Oct 19, 2026
  22. 7/7 builtin/submodule: propagate "--object-storage-format="Patrick Steinhardt, Oct 19, 2026
  23. 0/7 odb: introduce object storage extensionPatrick Steinhardt, Oct 21, 2026
  24. 1/7 loose: drop unused `repo_write_loose_object_map()`Patrick Steinhardt, Oct 21, 2026
  25. 2/7 setup: introduce object storage extensionPatrick Steinhardt, Oct 21, 2026
  26. 3/7 setup: allow overriding object storage format via environmentPatrick Steinhardt, Oct 21, 2026
  27. 4/7 builtin: expose the object storage formatPatrick Steinhardt, Oct 21, 2026
  28. 5/7 builtin/init: introduce handling of object storage formatPatrick Steinhardt, Oct 21, 2026
  29. Karthik NayakOct 21, 2026
  30. Patrick SteinhardtOct 23, 2026
  31. 6/7 builtin/clone: introduce "--object-storage-format="Patrick Steinhardt, Oct 21, 2026
  32. 7/7 builtin/submodule: propagate "--object-storage-format="Patrick Steinhardt, Oct 21, 2026
  33. Karthik NayakOct 21, 2026
  34. 0/7 odb: introduce object storage extensionPatrick Steinhardt, Oct 23, 2026
  35. 1/7 loose: drop unused `repo_write_loose_object_map()`Patrick Steinhardt, Oct 23, 2026
  36. 2/7 setup: introduce object storage extensionPatrick Steinhardt, Oct 23, 2026
  37. SZEDER GáborOct 24, 2026
  38. Patrick SteinhardtOct 26, 2026
  39. Karthik NayakOct 26, 2026
  40. Patrick SteinhardtOct 26, 2026
  41. 3/7 setup: allow overriding object storage format via environmentPatrick Steinhardt, Oct 23, 2026
  42. Karthik NayakOct 26, 2026
  43. Patrick SteinhardtOct 26, 2026
  44. 4/7 builtin: expose the object storage formatPatrick Steinhardt, Oct 23, 2026
  45. 5/7 builtin/init: introduce handling of object storage formatPatrick Steinhardt, Oct 23, 2026
  46. 6/7 builtin/clone: introduce "--object-storage-format="Patrick Steinhardt, Oct 23, 2026
  47. 7/7 builtin/submodule: propagate "--object-storage-format="Patrick Steinhardt, Oct 23, 2026
  48. Karthik NayakOct 26, 2026
  49. Patrick SteinhardtOct 26, 2026
  50. 0/7 odb: introduce object storage extensionPatrick Steinhardt, Oct 27, 2026
  51. 1/7 loose: drop unused `repo_write_loose_object_map()`Patrick Steinhardt, Oct 27, 2026
  52. 2/7 setup: introduce object storage extensionPatrick Steinhardt, Oct 27, 2026
  53. 3/7 setup: allow overriding object storage format via environmentPatrick Steinhardt, Oct 27, 2026
  54. 4/7 builtin: expose the object storage formatPatrick Steinhardt, Oct 27, 2026
  55. 5/7 builtin/init: introduce handling of object storage formatPatrick Steinhardt, Oct 27, 2026
  56. 6/7 builtin/clone: introduce "--object-storage-format="Patrick Steinhardt, Oct 27, 2026
  57. 7/7 builtin/submodule: propagate "--object-storage-format="Patrick Steinhardt, Oct 27, 2026
  58. Karthik NayakOct 28, 2026
  59. Patrick SteinhardtOct 28, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.