summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-03-24 19:27:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-03-24 19:27:13 (GMT)
commit2a4c8c36a7f6ad3520c0702f31dc7cff5176f1be (patch)
tree880686fbe5731690e0e81400c2be8fd5c418a4f4 /builtin
parent7e4ba3686ab04b2fdcb80f52e8784c9bebdb0401 (diff)
parent84ba959bbdf083ff7036619fa08152e46b9473a5 (diff)
downloadgit-2a4c8c36a7f6ad3520c0702f31dc7cff5176f1be.zip
git-2a4c8c36a7f6ad3520c0702f31dc7cff5176f1be.tar.gz
git-2a4c8c36a7f6ad3520c0702f31dc7cff5176f1be.tar.bz2
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index ed764c9..5295b72 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);