mirror of
https://github.com/git/git.git
synced 2026-03-11 17:39:46 +01:00
Merge branch 'ds/for-each-repo-w-worktree' into jch
"git for-each-repo" started from a secondary worktree did not work as expected, which has been corrected. * ds/for-each-repo-w-worktree: for-each-repo: simplify passing of parameters for-each-repo: work correctly in a worktree run-command: extract sanitize_repo_env helper for-each-repo: test outside of repo context
This commit is contained in:
@@ -1971,7 +1971,7 @@ int run_auto_maintenance(int quiet)
|
||||
return run_command(&maint);
|
||||
}
|
||||
|
||||
void prepare_other_repo_env(struct strvec *env, const char *new_git_dir)
|
||||
void sanitize_repo_env(struct strvec *env)
|
||||
{
|
||||
const char * const *var;
|
||||
|
||||
@@ -1980,6 +1980,11 @@ void prepare_other_repo_env(struct strvec *env, const char *new_git_dir)
|
||||
strcmp(*var, CONFIG_COUNT_ENVIRONMENT))
|
||||
strvec_push(env, *var);
|
||||
}
|
||||
}
|
||||
|
||||
void prepare_other_repo_env(struct strvec *env, const char *new_git_dir)
|
||||
{
|
||||
sanitize_repo_env(env);
|
||||
strvec_pushf(env, "%s=%s", GIT_DIR_ENVIRONMENT, new_git_dir);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user