path: root/
diff options
authorJunio C Hamano <>2010-03-07 20:47:17 (GMT)
committerJunio C Hamano <>2010-03-07 20:47:17 (GMT)
commit9317dc4f051452a0e0f7a62a5531b16adf36b553 (patch)
tree0ef09fc4b06b1721faa516a302e18a8c5baf887a /
parent27a23031056fbd540f7c34d78a3f097a3a7c211c (diff)
parent5ce9086ddfe6931ef34fcd99778c9235e2ee1839 (diff)
Merge branch 'gb/maint-submodule-env'
* gb/maint-submodule-env: is_submodule_modified(): clear environment properly submodules: ensure clean environment when operating in a submodule shell setup: clear_local_git_env() function rev-parse: --local-env-vars option Refactor list of of repo-local env vars
Diffstat (limited to '')
1 files changed, 7 insertions, 0 deletions
diff --git a/ b/
index 7a09566..6131670 100644
--- a/
+++ b/
@@ -172,6 +172,13 @@ get_author_ident_from_commit () {
LANG=C LC_ALL=C sed -ne "$pick_author_script"
+# 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)
# Make sure we are in a valid repository of a vintage we understand,
# if we require to be in a git repository.
if test -z "$NONGIT_OK"