diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-03-24 12:27:12 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-03-24 12:27:13 -0700 |
commit | 2a4c8c36a7f6ad3520c0702f31dc7cff5176f1be (patch) | |
tree | 880686fbe5731690e0e81400c2be8fd5c418a4f4 /builtin | |
parent | Merge branch 'master' of git://github.com/git-l10n/git-po (diff) | |
parent | submodule: fix regression for deinit without submodules (diff) | |
download | tgif-2a4c8c36a7f6ad3520c0702f31dc7cff5176f1be.tar.xz |
Merge branch 'sb/submodule-module-list-pathspec-fix'
A fix for a small regression in "module_list" helper that was
rewritten in C (also applies to 2.7.x).
* sb/submodule-module-list-pathspec-fix:
submodule: fix regression for deinit without submodules
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/submodule--helper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index ed764c9f0e..5295b727d4 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -37,9 +37,9 @@ static int module_list_compute(int argc, const char **argv, for (i = 0; i < active_nr; i++) { const struct cache_entry *ce = active_cache[i]; - if (!S_ISGITLINK(ce->ce_mode) || - !match_pathspec(pathspec, ce->name, ce_namelen(ce), - 0, ps_matched, 1)) + if (!match_pathspec(pathspec, ce->name, ce_namelen(ce), + 0, ps_matched, 1) || + !S_ISGITLINK(ce->ce_mode)) continue; ALLOC_GROW(list->entries, list->nr + 1, list->alloc); |