aboutsummaryrefslogtreecommitdiff
path: root/environment.c
diff options
context:
space:
mode:
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/environment.c b/environment.c
index 3fd4b1084..8fa032f30 100644
--- a/environment.c
+++ b/environment.c
@@ -76,6 +76,7 @@ int protect_hfs = PROTECT_HFS_DEFAULT;
#define PROTECT_NTFS_DEFAULT 0
#endif
int protect_ntfs = PROTECT_NTFS_DEFAULT;
+const char *core_fsmonitor;
/*
* The character that begins a commented line in user-editable file
@@ -97,7 +98,7 @@ int ignore_untracked_cache_config;
/* This is set by setup_git_dir_gently() and/or git_default_config() */
char *git_work_tree_cfg;
-static const char *namespace;
+static char *namespace;
static const char *super_prefix;
@@ -152,8 +153,10 @@ void setup_git_env(void)
if (getenv(NO_REPLACE_OBJECTS_ENVIRONMENT))
check_replace_refs = 0;
replace_ref_base = getenv(GIT_REPLACE_REF_BASE_ENVIRONMENT);
+ free(git_replace_ref_base);
git_replace_ref_base = xstrdup(replace_ref_base ? replace_ref_base
: "refs/replace/");
+ free(namespace);
namespace = expand_namespace(getenv(GIT_NAMESPACE_ENVIRONMENT));
shallow_file = getenv(GIT_SHALLOW_FILE_ENVIRONMENT);
if (shallow_file)
@@ -336,3 +339,8 @@ void reset_shared_repository(void)
{
need_shared_repository_from_config = 1;
}
+
+int use_optional_locks(void)
+{
+ return git_env_bool(GIT_OPTIONAL_LOCKS_ENVIRONMENT, 1);
+}