From: Junio C Hamano Date: Mon, 22 Feb 2010 23:16:50 GMT Subject: Re: [PATCH] submodules: ensure clean environment when operating in a submodule Message-ID: <7vsk8s274t.fsf@alter.siamese.dyndns.org> In-Reply-To: Giuseppe Bilotta writes: > Good point. All GIT_* env variables should be resent when descending > into a submodule. Is there a way to loop over them, or do I have to do > something horrible like env | grep ^GIT_ | cut -f1 -d= to get the > list? I would suggest to enumerate only what you care about explicitly, without consulting the user's environment. The user may have variables you do not know about and not related to git at all. IOW, don't try to be too clever for your own good ;-)