summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/submodule.c b/submodule.c
index 0b1d9c1dde..8e611fe1db 100644
--- a/submodule.c
+++ b/submodule.c
@@ -484,27 +484,14 @@ static void print_submodule_diff_summary(struct repository *r, struct rev_info *
strbuf_release(&sb);
}
-static void prepare_submodule_repo_env_no_git_dir(struct strvec *out)
-{
- const char * const *var;
-
- for (var = local_repo_env; *var; var++) {
- if (strcmp(*var, CONFIG_DATA_ENVIRONMENT))
- strvec_push(out, *var);
- }
-}
-
void prepare_submodule_repo_env(struct strvec *out)
{
- prepare_submodule_repo_env_no_git_dir(out);
- strvec_pushf(out, "%s=%s", GIT_DIR_ENVIRONMENT,
- DEFAULT_GIT_DIR_ENVIRONMENT);
+ prepare_other_repo_env(out, DEFAULT_GIT_DIR_ENVIRONMENT);
}
static void prepare_submodule_repo_env_in_gitdir(struct strvec *out)
{
- prepare_submodule_repo_env_no_git_dir(out);
- strvec_pushf(out, "%s=.", GIT_DIR_ENVIRONMENT);
+ prepare_other_repo_env(out, ".");
}
/*