Thread (17 messages) flat view 17 messages, 3 authors, 1d ago

Re: [PATCH 09/11] setup: rename ref storage format environment variables

From: Karthik Nayak <hidden>
Date: 2026-09-04 13:20:34

Patrick Steinhardt [off-list ref] writes:
quoted hunk ↗ jump to hunk
With the same reasoning as for git-init(1), rename the environment
variables GIT_REFERENCE_BACKEND and GIT_DEFAULT_REF_FORMAT to
GIT_REF_STORAGE and GIT_DEFAULT_REF_STORAGE, respectively. The old names
are kept as an alias to retain compatibility.

Signed-off-by: Patrick Steinhardt <redacted>
---
 Documentation/config/init.adoc         |  2 +-
 Documentation/git.adoc                 |  6 ++--
 environment.h                          |  1 +
 setup.c                                | 21 ++++++++------
 t/t0001-init.sh                        | 50 +++++++++++++++++-----------------
 t/t1419-exclude-refs.sh                | 16 +++++------
 t/t1423-ref-backend.sh                 | 18 ++++++------
 t/t7424-submodule-mixed-ref-formats.sh | 14 +++++-----
 t/test-lib.sh                          |  8 +++---
 9 files changed, 71 insertions(+), 65 deletions(-)
diff --git a/Documentation/config/init.adoc b/Documentation/config/init.adoc
index 9c78440192..3098e033ac 100644
--- a/Documentation/config/init.adoc
+++ b/Documentation/config/init.adoc
@@ -16,7 +16,7 @@ endif::[]
 `init.defaultRefFormat`::
 	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_FORMAT` environment variable take
+	option and the `GIT_DEFAULT_REF_STORAGE` environment variable take
 	precedence over this config.

 init.defaultSubmodulePathConfig::
diff --git a/Documentation/git.adoc b/Documentation/git.adoc
index e3260fde68..e34c74d995 100644
--- a/Documentation/git.adoc
+++ b/Documentation/git.adoc
@@ -590,13 +590,13 @@ double-quotes and respecting backslash escapes. E.g., the value
 	is always used. The default is "sha1".
 	See `--object-format` in linkgit:git-init[1].

-`GIT_DEFAULT_REF_FORMAT`::
+`GIT_DEFAULT_REF_STORAGE`::
 	If this variable is set, the default reference backend format for new
 	repositories will be set to this value. The default is "files".
 	See `--ref-storage` in linkgit:git-init[1].

-`GIT_REFERENCE_BACKEND`::
-    Specify which reference backend to be used along with its URI.
+`GIT_REF_STORAGE`::
+    Specify which ref storage to be used along with its URI.
     See `extensions.refStorage` option in linkgit:git-config[1] for more
     details. Overrides the config variable when used.
diff --git a/environment.h b/environment.h
index e7ec5b0437..e6b933f8db 100644
--- a/environment.h
+++ b/environment.h
@@ -44,6 +44,7 @@
 #define GIT_TEXT_DOMAIN_DIR_ENVIRONMENT "GIT_TEXTDOMAINDIR"
 #define GIT_ATTR_SOURCE_ENVIRONMENT "GIT_ATTR_SOURCE"
 #define GIT_REFERENCE_BACKEND_ENVIRONMENT "GIT_REFERENCE_BACKEND"
+#define GIT_REF_STORAGE_ENVIRONMENT "GIT_REF_STORAGE"
Shouldn't we also be adding and using
GIT_DEFAULT_REF_STORAGE_ENVIRONMENT? The rest of the changes look to be
in order.

[snip]

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help