Merge branch 'bw/submodule-is-active'
authorJunio C Hamano <gitster@pobox.com>
Thu, 30 Mar 2017 21:07:14 +0000 (14:07 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Mar 2017 21:07:14 +0000 (14:07 -0700)
"what URL do we want to update this submodule?" and "are we
interested in this submodule?" are split into two distinct
concepts, and then the way used to express the latter got extended,
paving a way to make it easier to manage a project with many
submodules and make it possible to later extend use of multiple
worktrees for a project with submodules.

* bw/submodule-is-active:
submodule add: respect submodule.active and submodule.<name>.active
submodule--helper init: set submodule.<name>.active
clone: teach --recurse-submodules to optionally take a pathspec
submodule init: initialize active submodules
submodule: decouple url and submodule interest
submodule--helper clone: check for configured submodules using helper
submodule sync: use submodule--helper is-active
submodule sync: skip work for inactive submodules
submodule status: use submodule--helper is-active
submodule--helper: add is-active subcommand

1  2 
Documentation/config.txt
builtin/clone.c
builtin/submodule--helper.c
submodule.c
Simple merge
diff --cc builtin/clone.c
index b4c929bb8afbf94967949279a1cc3b9b21dae100,a7be61d6b7035666538d863c4b08de2567698bd7..de85b85254e49ba0211ea6476179fc6d4c774ca9
@@@ -731,9 -749,9 +749,9 @@@ static int checkout(int submodule_progr
                die(_("unable to write new index file"));
  
        err |= run_hook_le(NULL, "post-checkout", sha1_to_hex(null_sha1),
 -                         sha1_to_hex(sha1), "1", NULL);
 +                         oid_to_hex(&oid), "1", NULL);
  
-       if (!err && option_recursive) {
+       if (!err && (option_recurse_submodules.nr > 0)) {
                struct argv_array args = ARGV_ARRAY_INIT;
                argv_array_pushl(&args, "submodule", "update", "--init", "--recursive", NULL);
  
Simple merge
diff --cc submodule.c
Simple merge