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

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

From
Karthik Nayak <karthik.188@gmail.com>
Date
Sep 4, 2026, 13:20 UTC
Message-ID
<CAOLa=ZT7WQ-J-i6n_nqm0MtDypm3V=3jyG6y6a8U=EvicMqgow@mail.gmail.com>
In-Reply-To
<20260904-b4-pks-unify-ref-storage-format-v1-9-08144e5004ff@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 61 quoted lines
> 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 <ps@pks.im>
> ---
>  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]
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 14 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.