Subject: Re: [PATCH v3 2/4] run-command: extract clear_local_repo_env helper

From: Derrick Stolee <[email-masked]>
Date: Mon, 2 Mar 2026 13:37:32 -0500

On 3/2/2026 1:03 PM, Jeff King wrote:
> So what about squashing in:
> 
> diff --git a/run-command.h b/run-command.h
> index 76b29d4832..882caeccc8 100644
> --- a/run-command.h
> +++ b/run-command.h
> @@ -518,11 +518,9 @@ void clear_local_repo_env(struct strvec *env);
>  
>  /**
>   * Convenience function which prepares env for a command to be run in a
> - * new repo. This adds all GIT_* environment variables to env with the
> - * exception of GIT_CONFIG_PARAMETERS and GIT_CONFIG_COUNT (which cause the
> - * corresponding environment variables to be unset in the subprocess) and adds
> - * an environment variable pointing to new_git_dir. See local_repo_env in
> - * environment.h for more information.
> + * new repo. This removes variables pointing to the local repository (using
> + * clear_local_repo_env() above), and adds an environment variable pointing to
> + * new_git_dir.
>   */
>  void prepare_other_repo_env(struct strvec *env, const char *new_git_dir);

I'm happy to squash this in.

Perhaps Junio can do it if we don't need other changes to v3. (I haven't
read the rest of the feedback.)

Thanks,
-Stolee