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>

Brandon Williams committed Feb 14, 2018 at 10:59 UTC 38f3f094218b9af2e309a54d359ef49334ecf0ec
1 file changed +5 -5
environment.c
+5 -5
@@ -98,7 +98,7 @@ int ignore_untracked_cache_config;
98 /* This is set by setup_git_dir_gently() and/or git_default_config() */
99 char *git_work_tree_cfg;
100
101 -static char *namespace;
101 +static char *git_namespace;
102
103 static const char *super_prefix;
104
@@ -156,8 +156,8 @@ void setup_git_env(void)
156 free(git_replace_ref_base);
157 git_replace_ref_base = xstrdup(replace_ref_base ? replace_ref_base
158 : "refs/replace/");
159 - free(namespace);
160 - namespace = expand_namespace(getenv(GIT_NAMESPACE_ENVIRONMENT));
159 + free(git_namespace);
160 + git_namespace = expand_namespace(getenv(GIT_NAMESPACE_ENVIRONMENT));
161 shallow_file = getenv(GIT_SHALLOW_FILE_ENVIRONMENT);
162 if (shallow_file)
163 set_alternate_shallow_file(shallow_file, 0);
@@ -191,9 +191,9 @@ const char *get_git_common_dir(void)
191
192 const char *get_git_namespace(void)
193 {
194 - if (!namespace)
194 + if (!git_namespace)
195 BUG("git environment hasn't been setup");
196 - return namespace;
196 + return git_namespace;
197 }
198
199 const char *strip_namespace(const char *namespaced_ref)