unpack-trees: fix sparse checkout's "unable to match directories"
[gitweb.git] / builtin / add.c
index 56a4e0af6b35ea9f6d86accad27a1c87bc5ad0d9..1a4672d121975504eed44c53865062d4161f542e 100644 (file)
@@ -446,7 +446,8 @@ int cmd_add(int argc, const char **argv, const char *prefix)
                        if (!seen[i] && pathspec[i][0]
                            && !file_exists(pathspec[i])) {
                                if (ignore_missing) {
-                                       if (excluded(&dir, pathspec[i], DT_UNKNOWN))
+                                       int dtype = DT_UNKNOWN;
+                                       if (excluded(&dir, pathspec[i], &dtype))
                                                dir_add_ignored(&dir, pathspec[i], strlen(pathspec[i]));
                                } else
                                        die("pathspec '%s' did not match any files",