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]