Merge branch 'bw/submodule-config-cleanup'
authorJunio C Hamano <gitster@pobox.com>
Sun, 27 Aug 2017 05:55:07 +0000 (22:55 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 27 Aug 2017 05:55:08 +0000 (22:55 -0700)
Code clean-up to avoid mixing values read from the .gitmodules file
and values read from the .git/config file.

* bw/submodule-config-cleanup:
  submodule: remove gitmodules_config
  unpack-trees: improve loading of .gitmodules
  submodule-config: lazy-load a repository's .gitmodules file
  submodule-config: move submodule-config functions to submodule-config.c
  submodule-config: remove support for overlaying repository config
  diff: stop allowing diff to have submodules configured in .git/config
  submodule: remove submodule_config callback routine
  unpack-trees: don't respect submodule.update
  submodule: don't rely on overlayed config when setting diffopts
  fetch: don't overlay config with submodule-config
  submodule--helper: don't overlay config in update-clone
  submodule--helper: don't overlay config in remote_submodule_branch
  add, reset: ensure submodules can be added or reset
  submodule: don't use submodule_from_name
  t7411: check configuration parsing errors

13 files changed:
1  2 
builtin/add.c
builtin/checkout.c
builtin/commit.c
builtin/grep.c
builtin/ls-files.c
builtin/reset.c
builtin/submodule--helper.c
diff.c
submodule-config.c
submodule.c
submodule.h
t/t7400-submodule-basic.sh
unpack-trees.c

diff --cc builtin/add.c
Simple merge
Simple merge
Simple merge
diff --cc builtin/grep.c
Simple merge
Simple merge
diff --cc builtin/reset.c
Simple merge
Simple merge
diff --cc diff.c
Simple merge
Simple merge
diff --cc submodule.c
Simple merge
diff --cc submodule.h
Simple merge
Simple merge
diff --cc unpack-trees.c
@@@ -377,9 -367,8 +366,9 @@@ static int check_updates(struct unpack_
        remove_scheduled_dirs();
  
        if (should_update_submodules() && o->update && !o->dry_run)
-               reload_gitmodules_file(index, &state);
+               load_gitmodules_file(index, &state);
  
 +      enable_delayed_checkout(&state);
        for (i = 0; i < index->cache_nr; i++) {
                struct cache_entry *ce = index->cache[i];