summaryrefslogtreecommitdiffstats
path: root/environment.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-06-23 01:29:05 +0200
committerJunio C Hamano <gitster@pobox.com>2023-06-23 01:29:06 +0200
commitd9f9f6b358c4d8aad492bc4995be0926048a6248 (patch)
tree62cf18a137ffecb83675d7d5dda4f2f43d33253d /environment.c
parentMerge branch 'tb/pack-bitmap-traversal-with-boundary' (diff)
parentrepository: create read_replace_refs setting (diff)
downloadgit-d9f9f6b358c4d8aad492bc4995be0926048a6248.tar.xz
git-d9f9f6b358c4d8aad492bc4995be0926048a6248.zip
Merge branch 'ds/disable-replace-refs'
Introduce a mechanism to disable replace refs globally and per repository. * ds/disable-replace-refs: repository: create read_replace_refs setting replace-objects: create wrapper around setting repository: create disable_replace_refs()
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/environment.c b/environment.c
index 6bd001efbd..d449f9719b 100644
--- a/environment.c
+++ b/environment.c
@@ -62,7 +62,6 @@ const char *editor_program;
const char *askpass_program;
const char *excludes_file;
enum auto_crlf auto_crlf = AUTO_CRLF_FALSE;
-int read_replace_refs = 1;
enum eol core_eol = EOL_UNSET;
int global_conv_flags_eol = CONV_EOL_RNDTRP_WARN;
char *check_roundtrip_encoding = "SHIFT-JIS";
@@ -183,7 +182,7 @@ void setup_git_env(const char *git_dir)
strvec_clear(&to_free);
if (getenv(NO_REPLACE_OBJECTS_ENVIRONMENT))
- read_replace_refs = 0;
+ disable_replace_refs();
replace_ref_base = getenv(GIT_REPLACE_REF_BASE_ENVIRONMENT);
git_replace_ref_base = xstrdup(replace_ref_base ? replace_ref_base
: "refs/replace/");