]> git.ipfire.org Git - thirdparty/git.git/commit - refs.c
refs: use ref_namespaces for replace refs base
authorDerrick Stolee <derrickstolee@github.com>
Fri, 5 Aug 2022 17:58:37 +0000 (17:58 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 5 Aug 2022 21:13:12 +0000 (14:13 -0700)
commit97e61e0f9cd96f403504ec97cfdf38f238777560
tree2ad031cf850eae3080ada2e74e5aa51ee092048d
parentb9342b3fd6308c351f53075c9c4339913b73451f
refs: use ref_namespaces for replace refs base

The git_replace_ref_base global is used to store the value of the
GIT_REPLACE_REF_BASE environment variable or the default of
"refs/replace/". This is initialized within setup_git_env().

The ref_namespaces array is a new centralized location for information
such as the ref namespace used for replace refs. Instead of having this
namespace stored in two places, use the ref_namespaces array instead.

For simplicity, create a local git_replace_ref_base variable wherever
the global was previously used.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/replace.c
cache.h
environment.c
log-tree.c
refs.c