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

[PATCH 10/11] setup: rename "init.defaultRefFormat" to "init.defaultRefStorage"

From
Patrick Steinhardt <ps@pks.im>
Date
Sep 4, 2026, 10:36 UTC
Message-ID
<20260904-b4-pks-unify-ref-storage-format-v1-10-08144e5004ff@pks.im>
In-Reply-To
<20260904-b4-pks-unify-ref-storage-format-v1-0-08144e5004ff@pks.im>

With the same reasoning as for git-init(1), rename the "init.defaultRefFormat" config option to "init.defaultRefStorage" and keep the old name as an alias.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 Documentation/BreakingChanges.adoc |  2 +-
 Documentation/config/feature.adoc  |  2 +-
 Documentation/config/init.adoc     |  2 +-
 setup.c                            |  8 +++++---
 t/t0001-init.sh                    | 16 ++++++++--------
 5 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc
index 73bb939359..af69f5c1e2 100644
--- a/Documentation/BreakingChanges.adoc
+++ b/Documentation/BreakingChanges.adoc
@@ -156,7 +156,7 @@ Cf. <2f5de416-04ba-c23d-1e0b-83bb655829a7@zombino.com>,
      "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"
+opt-in to the "reftable" format manually by setting the "init.defaultRefStorage"
 config. But defaults matter, and we think that overall users will have a better
 experience with less platform-specific quirks when they use the new backend by
 default.
diff --git a/Documentation/config/feature.adoc b/Documentation/config/feature.adoc
index 924f5ff4e3..7687e1a89a 100644
--- a/Documentation/config/feature.adoc
+++ b/Documentation/config/feature.adoc
@@ -25,7 +25,7 @@ reusing objects from multiple packs instead of just one.
 significantly smaller in the presence of certain filename collisions with Git's
 default name-hash.
 +
-* `init.defaultRefFormat=reftable` causes newly initialized repositories to use
+* `init.defaultRefStorage=reftable` causes newly initialized repositories to use
 the reftable format for storing references. This new format solves issues with
 case-insensitive filesystems, compresses better and performs significantly
 better with many use cases. Refer to Documentation/technical/reftable.adoc for
diff --git a/Documentation/config/init.adoc b/Documentation/config/init.adoc
index 3098e033ac..297c09cf43 100644
--- a/Documentation/config/init.adoc
+++ b/Documentation/config/init.adoc
@@ -13,7 +13,7 @@ endif::[]
 	`--object-format=` in linkgit:git-init[1]. Both the command line option
 	and the `GIT_DEFAULT_HASH` environment variable take precedence over
 	this config.
-`init.defaultRefFormat`::
+`init.defaultRefStorage`::
 	Allows overriding the default ref storage format for new repositories.
 	See `--ref-storage=` in linkgit:git-init[1]. Both the command line
 	option and the `GIT_DEFAULT_REF_STORAGE` environment variable take
diff --git a/setup.c b/setup.c
index 5de2aa0d2f..b81d4f134a 100644
--- a/setup.c
+++ b/setup.c
@@ -2697,7 +2697,8 @@ static int read_default_format_config(const char *key, const char *value,
 		goto out;
 	}
 
-	if (!strcmp(key, "init.defaultrefformat")) {
+	if (!strcmp(key, "init.defaultrefstorage") ||
+	    !strcmp(key, "init.defaultrefformat")) {
 		ret = git_config_string(&str, key, value);
 		if (ret)
 			goto out;
@@ -2709,7 +2710,7 @@ static int read_default_format_config(const char *key, const char *value,
 
 	/*
 	 * Enable the reftable format when "features.experimental" is enabled.
-	 * "init.defaultRefFormat" takes precedence over this setting.
+	 * "init.defaultRefStorage" takes precedence over this setting.
 	 */
 	if (!strcmp(key, "feature.experimental") &&
 	    cfg->ref_storage_format == REF_STORAGE_FORMAT_UNKNOWN &&
@@ -2781,7 +2782,8 @@ static void repository_format_configure(struct repository_format *repo_fmt,
 	 *      equivalent "GIT_DEFAULT_REF_FORMAT".
 	 *
 	 *   5. The default ref storage format for new repositories as
-	 *      configured via "init.defaultRefFormat"
+	 *      configured via "init.defaultRefStorage" or its deprecated
+	 *      equivalent "init.defaultRefFormat".
 	 *
 	 *   6. Otherwise, we fall back to the default ref storage format
 	 *      compiled into Git.
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index e4b9fae8bd..b481d763ff 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -659,9 +659,9 @@ test_expect_success 'GIT_REF_STORAGE refuses to reinitialize with different stor
 	test_cmp expect err
 '
 
-test_expect_success 'init warns about invalid init.defaultRefFormat' '
+test_expect_success 'init warns about invalid init.defaultRefStorage' '
 	test_when_finished "rm -rf repo" &&
-	test_config_global init.defaultRefFormat garbage &&
+	test_config_global init.defaultRefStorage garbage &&
 
 	echo "warning: unknown ref storage format ${SQ}garbage${SQ}" >expect &&
 	git init repo 2>err &&
@@ -714,9 +714,9 @@ do
 		test_cmp expect actual
 	'
 
-	test_expect_success "init with init.defaultRefFormat=$format" '
+	test_expect_success "init with init.defaultRefStorage=$format" '
 		test_when_finished "rm -rf refformat" &&
-		test_config_global init.defaultRefFormat $format &&
+		test_config_global init.defaultRefStorage $format &&
 		(
 			sane_unset GIT_DEFAULT_REF_STORAGE &&
 			git init refformat
@@ -753,9 +753,9 @@ test_expect_success "--ref-storage= overrides GIT_DEFAULT_REF_STORAGE" '
 	test_cmp expect actual
 '
 
-test_expect_success "GIT_DEFAULT_REF_STORAGE= overrides init.defaultRefFormat" '
+test_expect_success "GIT_DEFAULT_REF_STORAGE= overrides init.defaultRefStorage" '
 	test_when_finished "rm -rf refformat" &&
-	test_config_global init.defaultRefFormat files &&
+	test_config_global init.defaultRefStorage files &&
 
 	GIT_DEFAULT_REF_STORAGE=reftable git init refformat &&
 	echo reftable >expect &&
@@ -775,10 +775,10 @@ test_expect_success "init with feature.experimental=true" '
 	test_cmp expect actual
 '
 
-test_expect_success "init.defaultRefFormat overrides feature.experimental=true" '
+test_expect_success "init.defaultRefStorage overrides feature.experimental=true" '
 	test_when_finished "rm -rf refformat" &&
 	test_config_global feature.experimental true &&
-	test_config_global init.defaultRefFormat files &&
+	test_config_global init.defaultRefStorage files &&
 	(
 		sane_unset GIT_DEFAULT_REF_STORAGE &&
 		git init refformat
-- 
2.55.0.1007.g17ff1f9808.dirty
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 16 of 20 in “Fix inconsistent ref storage format terminology”
  1. 00/11 Fix inconsistent ref storage format terminologyPatrick Steinhardt, Sep 4, 2026
  2. 01/11 builtin/init: rename "--ref-format=" to "--ref-storage="Patrick Steinhardt, Sep 4, 2026
  3. Karthik NayakSep 4, 2026
  4. Patrick SteinhardtSep 7, 2026
  5. 02/11 builtin/clone: rename "--ref-format=" to "--ref-storage="Patrick Steinhardt, Sep 4, 2026
  6. 03/11 builtin/refs: rename "--ref-format=" to "--ref-storage="Patrick Steinhardt, Sep 4, 2026
  7. 04/11 builtin/submodule: rename "--ref-format=" to "--ref-storage="Patrick Steinhardt, Sep 4, 2026
  8. 05/11 builtin/rev-parse: rename "--show-ref-format" to "--show-ref-storage"Patrick Steinhardt, Sep 4, 2026
  9. 06/11 help: rename "default-ref-format" to "default-ref-storage"Patrick Steinhardt, Sep 4, 2026
  10. 07/11 refs: expose function to parse reference URIsPatrick Steinhardt, Sep 4, 2026
  11. Karthik NayakSep 4, 2026
  12. 08/11 setup: refactor how we configure the ref storage formatPatrick Steinhardt, Sep 4, 2026
  13. 09/11 setup: rename ref storage format environment variablesPatrick Steinhardt, Sep 4, 2026
  14. Karthik NayakSep 4, 2026
  15. Patrick SteinhardtSep 7, 2026
  16. 10/11 setup: rename "init.defaultRefFormat" to "init.defaultRefStorage"Patrick Steinhardt, Sep 4, 2026
  17. 11/11 setup: allow "git init --ref-storage=" to specify a payloadPatrick Steinhardt, Sep 4, 2026
  18. Karthik NayakSep 4, 2026
  19. Junio C HamanoSep 4, 2026
  20. Patrick SteinhardtSep 7, 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.