dir: convert is_excluded to take an index
[gitweb.git] / builtin / add.c
index 9f53f020d0fc7184ac803a4346bdf426a814ed72..0b52aeced3bc40276e11c7cc829eb5901191e8e1 100644 (file)
@@ -436,8 +436,9 @@ int cmd_add(int argc, const char **argv, const char *prefix)
                             !file_exists(path))) {
                                if (ignore_missing) {
                                        int dtype = DT_UNKNOWN;
-                                       if (is_excluded(&dir, path, &dtype))
-                                               dir_add_ignored(&dir, path, pathspec.items[i].len);
+                                       if (is_excluded(&dir, &the_index, path, &dtype))
+                                               dir_add_ignored(&dir, &the_index,
+                                                               path, pathspec.items[i].len);
                                } else
                                        die(_("pathspec '%s' did not match any files"),
                                            pathspec.items[i].original);