]> git.ipfire.org Git - thirdparty/git.git/commit - t/t7413-submodule-is-active.sh
submodule--helper: add is-active subcommand
authorBrandon Williams <bmwill@google.com>
Thu, 16 Mar 2017 22:29:43 +0000 (15:29 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 17 Mar 2017 18:06:09 +0000 (11:06 -0700)
commit5c2bd8b77aeefa4c6484684ef3e9227a6287a93e
tree2ffabfe78d04fff2a4be9bd5d531d1ba47034396
parentd6db3f216544d05e09159756812ccbcb16861d71
submodule--helper: add is-active subcommand

The definition of which submodules are of interest by the user
is tied to the configuration submodule.<name>.url; when it is
set to a non-empty string, it is of interest.  We'd want to be
able to later change this definition, but there are many places
that explicitly check this condition in the scripted Porcelain.

Introduce the "is-active" subcommand to "submodule--helper", so
that the exact definition of what submodule is of interest can
be centrally defined (and changed in later steps).  In a few
patches that follow, this helper is used to replace the explicit
checks of the configuration variable in scripts.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c
t/t7413-submodule-is-active.sh [new file with mode: 0755]