]> git.ipfire.org Git - thirdparty/git.git/blobdiff - submodule.c
Merge branch 'jk/apply-binary-hunk-parsing-fix'
[thirdparty/git.git] / submodule.c
index 0b1d9c1dde5a8fc5cec04f13241f94b8a4378d5f..8e611fe1dbf1f7616040f8359ee5d9b9892ad191 100644 (file)
@@ -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, ".");
 }
 
 /*