Thread (83 messages) 83 messages, 2 authors, 2017-03-18

Re: [PATCH v2 07/11] submodule update: add `--init-active` switch

From: Brandon Williams <hidden>
Date: 2017-03-09 18:08:42

On 03/08, Stefan Beller wrote:
On Wed, Mar 8, 2017 at 5:23 PM, Brandon Williams [off-list ref] wrote:
quoted
The new switch `--init-active` initializes the submodules which are
configured in `submodule.active` instead of those given as
command line arguments before updating. In the first implementation this
is made incompatible with further command line arguments as it is
unclear what the user means by

    git submodule update --init --init-active <paths>

This new switch allows users to record more complex patterns as it saves
retyping them whenever you invoke update.

Based on a patch by Stefan Beller [off-list ref]

Signed-off-by: Brandon Williams <redacted>

quoted
@@ -568,7 +573,17 @@ cmd_update()

        if test -n "$init"
        then
-               cmd_init "--" "$@" || return
+               if test "$init" = "by_config"
+               then
+                       if test $# -gt 0
+                       then
+                               die "$(gettext "path arguments are incompatible with --init-active")"
+                       fi
+                       cmd_init "--" $(git config --get-all submodule.active) || return
What happens with submodule.<name>.actives here?
Nothing?  I am still not 100% certain that we really need the
submodule.<name>.active config but it seemed like what we decided upon
last we discussed this.

Maybe we don't even need this as an option?  Maybe update should be able
to just 'update' all active submodules without having to make an
explicit call to cmd_init?

-- 
Brandon Williams
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help