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

Re: [GSoC PATCH 2/2] repo: add the field objects.format

From
Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Date
Aug 26, 2025, 14:51 UTC
Message-ID
<261E9FC0-EE4A-4B4B-BA21-69B93EBA6933@gmail.com>
In-Reply-To
<xmqqh5y01mv3.fsf@gitster.g>
> Yes, and extensions.objectFormat specifies the hash algorithm used
> in the repository, extensions.compatObjectFormat specifies a
> compatibility algorithm to use.  So objectFormat is a good name to
> call this new "repository metadata".

I was discussing with Patrick some weeks ago about the compatibility formats. By now, the "storage", "input", and "output" formats are the same. For example, rev-parse already has those options, even though they return the same value (2eabd38313 (rev-parse: add a --show-object-format option, 2019-10-28)).

Repo info is easy to handle this situation in the future by just adding a new field. By now, objects.format returns the storage format. If/when we have those formats implemented, I think a good approach would be add two more values to `objects`:

objects.input-format=... objects.output-format=...

> Perhaps drop "s" from "objects.format" before it becomes too late?
Ok!
> We may also want to reconsider references.format as that is not in
> line with either extensions.refStorage or --ref-format (taken by
> 'git init' and 'git clone').
What would be a better name? reference.format or ref.format? 
> Do these keys always have to be two words separated by dots?

The idea is to group everything into categories, than it will be easier. I have a future feature planned for that one could call, for example, `git repo layout` and then it will return both layout.bare and layout.shallow.

> I am asking if there are other keys that would plausibly fit next to this
> object.format thing.  object.count to report how many objects there
> are in the repository, or things like that, perhaps?

Given that it would survey how many objects exist in the repository, this would be better placed in the planned `git repo survey` that Justin is working on (we discussed a little more about that in https://lore.kernel.org/git/vygdkwopfzrbdpxpxebnq3xdlg3ow4i3w5y5evduae2zuelqcn@la2dikht2qrf/ ). I'm cc'ing Justin here for more info about it.

In the `info` side, by now I don't remember any other key to be placed under `object` aside from the aforementioned input and output format. Perhaps an idea is whether we're using packfiles or only loose objects, but I don't know if it would be useful.

Thanks!
Previous: Junio C HamanoNext: Karthik Nayak
Message 16 of 37 in “repo: add -z and objects.format”
  1. 0/2 repo: add -z and objects.formatLucas Seiki Oshiro, Aug 20, 2025
  2. 1/2 repo: add the flag -z as an alias for --format=nulLucas Seiki Oshiro, Aug 20, 2025
  3. Karthik NayakAug 21, 2025
  4. Junio C HamanoAug 21, 2025
  5. Karthik NayakAug 21, 2025
  6. Patrick SteinhardtAug 21, 2025
  7. Lucas Seiki OshiroAug 21, 2025
  8. Junio C HamanoAug 21, 2025
  9. Lucas Seiki OshiroAug 21, 2025
  10. Junio C HamanoAug 21, 2025
  11. Jean-Noël AVILAAug 21, 2025
  12. Junio C HamanoAug 21, 2025
  13. 2/2 repo: add the field objects.formatLucas Seiki Oshiro, Aug 20, 2025
  14. Patrick SteinhardtAug 21, 2025
  15. Junio C HamanoAug 21, 2025
  16. Lucas Seiki OshiroAug 26, 2025
  17. Karthik NayakAug 21, 2025
  18. Junio C HamanoAug 21, 2025
  19. Patrick SteinhardtAug 21, 2025
  20. Lucas Seiki OshiroAug 21, 2025
  21. Patrick SteinhardtAug 21, 2025
  22. Junio C HamanoAug 21, 2025
  23. Lucas Seiki OshiroAug 26, 2025
  24. 0/2 repo: add -z and objects.formatLucas Seiki Oshiro, Aug 26, 2025
  25. 1/2 repo: add the flag -z as an alias for --format=nulLucas Seiki Oshiro, Aug 26, 2025
  26. Junio C HamanoAug 28, 2025
  27. Lucas Seiki OshiroSep 1, 2025
  28. 2/2 repo: add the field objects.formatLucas Seiki Oshiro, Aug 26, 2025
  29. 0/2 repo: add -z and objects.formatLucas Seiki Oshiro, Sep 1, 2025
  30. 1/2 repo: add the flag -z as an alias for --format=nulLucas Seiki Oshiro, Sep 1, 2025
  31. Junio C HamanoSep 2, 2025
  32. Lucas Seiki OshiroSep 2, 2025
  33. 2/2 repo: add the field objects.formatLucas Seiki Oshiro, Sep 1, 2025
  34. 0/2 repo: add -z and objects.formatLucas Seiki Oshiro, Sep 4, 2025
  35. 1/2 repo: add the flag -z as an alias for --format=nulLucas Seiki Oshiro, Sep 4, 2025
  36. 2/2 repo: add the field objects.formatLucas Seiki Oshiro, Sep 4, 2025
  37. Junio C HamanoSep 4, 2025

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.