From: Junio C Hamano Date: Thu, 30 Mar 2017 21:07:14 +0000 (-0700) Subject: Merge branch 'bw/submodule-is-active' X-Git-Tag: v2.13.0-rc0~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a93dcb0a56a38289632a85d906e49150b1e34100;p=git Merge branch 'bw/submodule-is-active' "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..active submodule--helper init: set submodule..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 --- a93dcb0a56a38289632a85d906e49150b1e34100 diff --cc builtin/clone.c index b4c929bb8a,a7be61d6b7..de85b85254 --- a/builtin/clone.c +++ b/builtin/clone.c @@@ -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);