@@ -290,13 +290,6 @@ get_author_ident_from_commit () {
parse_ident_from_commit author AUTHOR
}
-# Clear repo-local GIT_* environment variables. Useful when switching to
-# another repository (e.g. when entering a submodule). See also the env
-# list in git_connect()
-clear_local_git_env() {
- unset $(git rev-parse --local-env-vars)
-}
-
# Generate a virtual base file for a two-file merge. Uses git apply to
# remove lines from $1 that are not in $2, leaving only common lines.
create_virtual_base() {
@@ -69,7 +69,7 @@ isnumber()
sanitize_submodule_env()
{
save_config=$GIT_CONFIG_PARAMETERS
- clear_local_git_env
+ unset $(git rev-parse --local-env-vars)
GIT_CONFIG_PARAMETERS=$save_config
export GIT_CONFIG_PARAMETERS
}
Since 14111fc4927 (git: submodule honor -c credential.* from command line, 2016-02-29) the clear_local_git_env() function has only been used in the sanitize_submodule_env() function, let's inline its one-line functionality there. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- git-sh-setup.sh | 7 ------- git-submodule.sh | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-)