The aim of this series is to cleanup the submodule-config and make it simpler to use. The two main parts to this series are: (1) removing the ability to overlay the repository's config over the submodule-config. This makes the API clunky as you don't really know when you want to overlay and when you don't. So instead all the relevant sections (where you are interested in the repository's config) are patched to read the configuration directly from the repository's config. (2) Add the ability to lazy-load the gitmodules file from the working directory. Most callers are required to first populate the submodule-config by calling gitmodules_config. Instead let's just lazy-load it if needed. Only a couple callers will still require loading the gitmodules files by hand while the rest can have it lazy-loaded and no longer need to explicitly load it themselves. This falls more in line with how specific revisions are already lazy-loaded. As a side note, instead of having unpack-trees read configuration for the 'update' config (which is used by submodule update) we may just want to drop respecting this all together as it doesn't make much sense in the context of a checkout or reset. If that's the case then we can make the parts of the code which use 'update' even simpler. This series is built on and requires the 'bw/grep-recurse-submodules' and 'bc/object-id' branches. Brandon Williams (15): t7411: check configuration parsing errors submodule: don't use submodule_from_name add, reset: ensure submodules can be added or reset submodule--helper: don't overlay config in remote_submodule_branch submodule--helper: don't overlay config in update-clone fetch: don't overlay config with submodule-config submodule: don't rely on overlayed config when setting diffopts unpack-trees: don't rely on overlayed config submodule: remove submodule_config callback routine diff: stop allowing diff to have submodules configured in .git/config submodule-config: remove support for overlaying repository config submodule-config: move submodule-config functions to submodule-config.c submodule-config: lazy-load a repository's .gitmodules file unpack-trees: improve loading of .gitmodules submodule: remove gitmodules_config builtin/add.c | 1 + builtin/checkout.c | 3 +- builtin/commit.c | 1 - builtin/diff-files.c | 1 - builtin/diff-index.c | 1 - builtin/diff-tree.c | 1 - builtin/diff.c | 2 - builtin/fetch.c | 5 -- builtin/grep.c | 4 -- builtin/ls-files.c | 6 +- builtin/mv.c | 1 - builtin/read-tree.c | 2 - builtin/reset.c | 3 +- builtin/rm.c | 1 - builtin/submodule--helper.c | 42 ++++++------ diff.c | 3 - submodule-config.c | 65 ++++++++++++++---- submodule-config.h | 8 +-- submodule.c | 140 ++++++++++++++++----------------------- submodule.h | 8 +-- t/helper/test-submodule-config.c | 7 -- t/t4027-diff-submodule.sh | 67 ------------------- t/t7400-submodule-basic.sh | 10 --- t/t7411-submodule-config.sh | 87 +++++------------------- unpack-trees.c | 54 +++++++++------ 25 files changed, 189 insertions(+), 334 deletions(-) -- 2.14.0.rc0.400.g1c36432dff-goog