It does make sense to move this to run-command.c from submodule.c
and the function name is already suitable for being global. I
however cannot help wondering if we should also pay attention to the
GIT_CONFIG_KEY_$n and GIT_CONFIG_VALUE_$n pairs (which is not a new
problem in this patch).
Note that I changed the function name (the previous one was too
submodule-specific). As for the config pairs, they are currently being
passed through - do you have a situation in mind in which they should
not be passed through?
This helper may sit better next to prep_childenv(), instead of just
saying "the location does not matter, just append randomly at the
end", though.
Otherwise looking good.
Thanks.
Thanks - I'll move it.