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

[PATCH v3 0/2] Add reftable by default as a breaking change

From
Patrick Steinhardt <ps@pks.im>
Date
Jul 4, 2025, 09:42 UTC
Message-ID
<20250704-pks-reftable-default-backend-v3-0-a1eb63e8442a@pks.im>
In-Reply-To
<20250702-pks-reftable-default-backend-v1-0-84dbaddafb50@pks.im>
Hi,

the recent thread at [1] motivated me to hack together this tiny patch series that paves our path towards making the reftable backend the default backend. It does two things:

  - It announces the breaking change for Git 3.0.
  - It makes it the default now already when "feature.experimental" is
    enabled.

The first item is subject to ecosystem support, most notably in libraries like Gitoxide, libgit2 and JGit. The second item is intended to extend the user base to power users so that we get more test exposure out in the wild before we make it the default in Git 3.0.

Changes in v2:
  - Improve the breaking changes announcement a bit based on feedback.
  - Introduce a `REF_STORAGE_FORMAT_DEFAULT` define.
  - Print the default ref format as part of `git version --build-options`.
  - Link to v1: https://lore.kernel.org/r/20250702-pks-reftable-default-backend-v1-0-84dbaddafb50@pks.im
Changes in v3:
  - Small tweaks to the commit messages.
  - Mention better data compression as another benefit.
  - Link to v2: https://lore.kernel.org/r/20250703-pks-reftable-default-backend-v2-0-5a27e72a8c5e@pks.im
Thanks!
Patrick
[1]: <xmqqtt3vkhwk.fsf@gitster.g>
---
Patrick Steinhardt (2):
      BreakingChanges: announce switch to "reftable" format
      setup: use "reftable" format when experimental features are enabled
 Documentation/BreakingChanges.adoc | 47 ++++++++++++++++++++++++++++++++++++++
 Documentation/config/feature.adoc  |  6 +++++
 help.c                             |  2 ++
 repository.h                       |  6 +++++
 setup.c                            | 14 ++++++++++++
 t/t0001-init.sh                    | 45 ++++++++++++++++++++++++++++++++++++
 6 files changed, 120 insertions(+)
Range-diff versus v2:
1:  efbc0ba7338 ! 1:  ecf018b81ff BreakingChanges: announce switch to "reftable" format
    @@ Commit message
         significantly better in many use cases.
     
         Announce that we will switch to the "reftable" format in Git 3.0 for
    -    newly created repositories.
    +    newly created repositories and wire up the change, hidden behind the
    +    WITH_BREAKING_CHANGES preprocessor define.
     
         This switch is dependent on support in the larger Git ecosystem. Most
         importantly, libraries like JGit, libgit2 and Gitoxide should support
    @@ Documentation/BreakingChanges.adoc: Cf. <2f5de416-04ba-c23d-1e0b-83bb655829a7@zo
     +  ** It is impossible to store two references that only differ in casing on
     +     case-insensitive filesystems with the "files" format. This issue is common
     +     on Windows and macOS platforms. As the "reftable" backend does not use
    -+     filesystem paths anymore to encode reference names this problem goes away.
    ++     filesystem paths to encode reference names this problem goes away.
     +  ** Similarly, macOS normalizes path names that contain unicode characters,
     +     which has the consequence that you cannot store two names with unicode
     +     characters that are encoded differently with the "files" backend. Again,
    @@ Documentation/BreakingChanges.adoc: Cf. <2f5de416-04ba-c23d-1e0b-83bb655829a7@zo
     +     every reference is created as a separate file. The "reftable" backend
     +     significantly outperforms the "files" backend by multiple orders of
     +     magnitude.
    ++  ** The reftable backend uses a binary format with prefix compression for
    ++     reference names. As a result, the format uses less space compared to the
    ++     "packed-refs" file.
     ++
     +Users that get immediate benefit from the "reftable" backend could continue to
     +opt-in to the "reftable" format manually by setting the "init.defaultRefFormat"
2:  812cc75dfd8 = 2:  642f774d743 setup: use "reftable" format when experimental features are enabled

--- base-commit: 83014dc05f6fc9275c0a02886cb428805abaf9e5 change-id: 20250702-pks-reftable-default-backend-6c30f330250a

Previous: Junio C HamanoNext: Patrick Steinhardt
Message 18 of 21 in “Add reftable by default as a breaking change”
  1. 0/2 Add reftable by default as a breaking changePatrick Steinhardt, Jul 2, 2025
  2. 1/2 BreakingChanges: announce switch to "reftable" formatPatrick Steinhardt, Jul 2, 2025
  3. Junio C HamanoJul 2, 2025
  4. brian m. carlsonJul 2, 2025
  5. Patrick SteinhardtJul 3, 2025
  6. Patrick SteinhardtJul 3, 2025
  7. Justin ToblerJul 2, 2025
  8. Patrick SteinhardtJul 3, 2025
  9. 2/2 setup: use "reftable" format when experimental features are enabledPatrick Steinhardt, Jul 2, 2025
  10. 0/2 Add reftable by default as a breaking changePatrick Steinhardt, Jul 3, 2025
  11. 1/2 BreakingChanges: announce switch to "reftable" formatPatrick Steinhardt, Jul 3, 2025
  12. Karthik NayakJul 3, 2025
  13. Patrick SteinhardtJul 3, 2025
  14. Karthik NayakJul 3, 2025
  15. Patrick SteinhardtJul 3, 2025
  16. 2/2 setup: use "reftable" format when experimental features are enabledPatrick Steinhardt, Jul 3, 2025
  17. Junio C HamanoJul 7, 2025
  18. 0/2 Add reftable by default as a breaking changePatrick Steinhardt, Jul 4, 2025
  19. 1/2 BreakingChanges: announce switch to "reftable" formatPatrick Steinhardt, Jul 4, 2025
  20. 2/2 setup: use "reftable" format when experimental features are enabledPatrick Steinhardt, Jul 4, 2025
  21. Karthik NayakJul 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.