summaryrefslogtreecommitdiffstats
path: root/contrib/persistent-https
diff options
context:
space:
mode:
authorKarthik Nayak <karthik.188@gmail.com>2026-02-25 10:40:46 +0100
committerJunio C Hamano <gitster@pobox.com>2026-02-25 09:40:00 -0800
commit53592d68e86814fcc4a8df6cc38340597e56fe5a (patch)
treeba40af5ae430ea79abd4f1898562c736f4f408b9 /contrib/persistent-https
parent01dc84594ee365ee7086fccc7f590ab527730531 (diff)
downloadgit-53592d68e86814fcc4a8df6cc38340597e56fe5a.tar.gz
git-53592d68e86814fcc4a8df6cc38340597e56fe5a.zip
refs: add GIT_REFERENCE_BACKEND to specify reference backend
Git allows setting a different object directory via 'GIT_OBJECT_DIRECTORY', but provides no equivalent for references. In the previous commit we extended the 'extensions.refStorage' config to also support an URI input for reference backend with location. Let's also add a new environment variable 'GIT_REFERENCE_BACKEND' that takes in the same input as the config variable. Having an environment variable allows us to modify the reference backend and location on the fly for individual Git commands. The environment variable also allows usage of alternate reference directories during 'git-clone(1)' and 'git-init(1)'. Add the config to the repository when created with the environment variable set. When initializing the repository with an alternate reference folder, create the required stubs in the repositories $GIT_DIR. The inverse, i.e. removal of the ref store doesn't clean up the stubs in the $GIT_DIR since that would render it unusable. Removal of ref store is only used when migrating between ref formats and cleanup of the $GIT_DIR doesn't make sense in such a situation. Helped-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions