builtin/upload-archive.c: use error_errno()
[gitweb.git] / builtin / submodule--helper.c
index ed764c9f0e5f76bbf8da7297315a4c29c0636271..5295b727d4609fa33a08c31b2d051ce3f98244fb 100644 (file)
@@ -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);