summaryrefslogtreecommitdiff
path: root/environment.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-02-14 18:59:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-22 18:08:05 (GMT)
commit38f3f094218b9af2e309a54d359ef49334ecf0ec (patch)
tree0d5b9bb934961ed3ddb9ffe3585e3caaf6330f10 /environment.c
parentc2a46a7c1f4697e805efc42e08b796d057db2aad (diff)
downloadgit-38f3f094218b9af2e309a54d359ef49334ecf0ec.zip
git-38f3f094218b9af2e309a54d359ef49334ecf0ec.tar.gz
git-38f3f094218b9af2e309a54d359ef49334ecf0ec.tar.bz2
environment: rename 'namespace' variables
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/environment.c b/environment.c
index 98f77ea..270ba98 100644
--- a/environment.c
+++ b/environment.c
@@ -98,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 char *namespace;
+static char *git_namespace;
static const char *super_prefix;
@@ -156,8 +156,8 @@ void setup_git_env(void)
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));
+ free(git_namespace);
+ git_namespace = expand_namespace(getenv(GIT_NAMESPACE_ENVIRONMENT));
shallow_file = getenv(GIT_SHALLOW_FILE_ENVIRONMENT);
if (shallow_file)
set_alternate_shallow_file(shallow_file, 0);
@@ -191,9 +191,9 @@ const char *get_git_common_dir(void)
const char *get_git_namespace(void)
{
- if (!namespace)
+ if (!git_namespace)
BUG("git environment hasn't been setup");
- return namespace;
+ return git_namespace;
}
const char *strip_namespace(const char *namespaced_ref)