Skip to content

Commit 38f3f09

Browse files
bmwillgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c2a46a7 commit 38f3f09

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

environment.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ int ignore_untracked_cache_config;
9898
/* This is set by setup_git_dir_gently() and/or git_default_config() */
9999
char *git_work_tree_cfg;
100100

101-
static char *namespace;
101+
static char *git_namespace;
102102

103103
static const char *super_prefix;
104104

@@ -156,8 +156,8 @@ void setup_git_env(void)
156156
free(git_replace_ref_base);
157157
git_replace_ref_base = xstrdup(replace_ref_base ? replace_ref_base
158158
: "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));
161161
shallow_file = getenv(GIT_SHALLOW_FILE_ENVIRONMENT);
162162
if (shallow_file)
163163
set_alternate_shallow_file(shallow_file, 0);
@@ -191,9 +191,9 @@ const char *get_git_common_dir(void)
191191

192192
const char *get_git_namespace(void)
193193
{
194-
if (!namespace)
194+
if (!git_namespace)
195195
BUG("git environment hasn't been setup");
196-
return namespace;
196+
return git_namespace;
197197
}
198198

199199
const char *strip_namespace(const char *namespaced_ref)

0 commit comments

Comments
 (0)