git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Cc: "brian m. carlson" <sandals@crustytoothpaste.net>,
	 Karthik Nayak <karthik.188@gmail.com>,
	 K Jayatheerth <jayatheerthkulkarni2005@gmail.com>,
	ryenus@gmail.com,  Junio C Hamano <gitster@pobox.com>,
	Justin Tobler <jltobler@gmail.com>
Subject: [PATCH v3 0/2] Add reftable by default as a breaking change
Date: Fri, 04 Jul 2025 11:42:55 +0200	[thread overview]
Message-ID: <20250704-pks-reftable-default-backend-v3-0-a1eb63e8442a@pks.im> (raw)
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


  parent reply	other threads:[~2025-07-04  9:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-02 10:14 [PATCH 0/2] Add reftable by default as a breaking change Patrick Steinhardt
2025-07-02 10:14 ` [PATCH 1/2] BreakingChanges: announce switch to "reftable" format Patrick Steinhardt
2025-07-02 17:03   ` Junio C Hamano
2025-07-02 21:21     ` brian m. carlson
2025-07-03  4:43       ` Patrick Steinhardt
2025-07-03  4:43     ` Patrick Steinhardt
2025-07-02 17:17   ` Justin Tobler
2025-07-03  5:00     ` Patrick Steinhardt
2025-07-02 10:14 ` [PATCH 2/2] setup: use "reftable" format when experimental features are enabled Patrick Steinhardt
2025-07-03  6:15 ` [PATCH v2 0/2] Add reftable by default as a breaking change Patrick Steinhardt
2025-07-03  6:15   ` [PATCH v2 1/2] BreakingChanges: announce switch to "reftable" format Patrick Steinhardt
2025-07-03 10:54     ` Karthik Nayak
2025-07-03 11:42       ` Patrick Steinhardt
2025-07-03 12:24         ` Karthik Nayak
2025-07-03 13:08           ` Patrick Steinhardt
2025-07-03  6:15   ` [PATCH v2 2/2] setup: use "reftable" format when experimental features are enabled Patrick Steinhardt
2025-07-07  5:37   ` [PATCH v2 0/2] Add reftable by default as a breaking change Junio C Hamano
2025-07-04  9:42 ` Patrick Steinhardt [this message]
2025-07-04  9:42   ` [PATCH v3 1/2] BreakingChanges: announce switch to "reftable" format Patrick Steinhardt
2025-07-04  9:42   ` [PATCH v3 2/2] setup: use "reftable" format when experimental features are enabled Patrick Steinhardt
2025-07-04 13:14   ` [PATCH v3 0/2] Add reftable by default as a breaking change Karthik Nayak

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=20250704-pks-reftable-default-backend-v3-0-a1eb63e8442a@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jayatheerthkulkarni2005@gmail.com \
    --cc=jltobler@gmail.com \
    --cc=karthik.188@gmail.com \
    --cc=ryenus@gmail.com \
    --cc=sandals@crustytoothpaste.net \
    /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;
as well as URLs for NNTP newsgroup(s).