From: Stefan Beller Date: Wed, 11 May 2016 00:59:55 GMT Subject: [PATCH 5/7] submodule--helper module_list_compute: allow label or name arguments Message-ID: <1462928397-1708-6-git-send-email-sbeller@google.com> In-Reply-To: <1462928397-1708-1-git-send-email-sbeller@google.com> Additionally to taking a pathspec, `module_list_compute` will also take labels and submodule names, when these are prefixed by '*' and ':' respectively. `module_list_compute` is used by other functions in the submodule helper: * module_list, used by `submodule {deinit, status, sync, foreach}` * module_init, used by `submodule init` * update_clone, used by `submodule update` {foreach, update} do not pass on command line arguments to the listing function such that these are not affected. The rest of them {deinit, status, sync, init} will be exercised in additional tests. As the labeling requires lookup of .gitmodules files, we need to make sure the submodule config cache is initialized in all the functions, that's why there are additional calls to gitmodules_config() and git_config(...); Signed-off-by: Stefan Beller --- Documentation/git-submodule.txt | 22 +++++++++-- builtin/submodule--helper.c | 76 +++++++++++++++++++++++++++++++----- git-submodule.sh | 8 ++-- t/t7412-submodule--helper.sh | 86 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 175 insertions(+), 17 deletions(-) diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt index 9ba8895..35ca355 100644 --- a/Documentation/git-submodule.txt +++ b/Documentation/git-submodule.txt @@ -11,16 +11,16 @@ SYNOPSIS [verse] 'git submodule' [--quiet] add [-b ] [-f|--force] [-l|--label