git-submodule foreach: export .gitmodules settings as variables
This makes it easy to access per-submodule variables. For example,
git submodule foreach 'git checkout $(git config --file $toplevel/.gitmodules submodule.$name.branch) && git pull'
can now be reduced to
git submodule foreach 'git checkout $submodule_branch && git pull'
Every submodule.<name>.<opt> setting from .gitmodules is available as
a $submodule_<sanitized-opt> variable. These variables are not
propagated recursively into nested submodules.
Signed-off-by: W. Trevor King <wking@tremily.us>
Based-on-patch-by: Phil Hord <phil.hord@gmail.com>