dir: convert prep_exclude to take an index
[gitweb.git] / unpack-trees.c
index aa15111fefc8ca333edeeeb3ac77a8b946e4c6a5..f278cd23f0f365f17c42d02198d46b92b0357a1f 100644 (file)
@@ -1068,7 +1068,7 @@ static int clear_ce_flags_dir(struct cache_entry **cache, int nr,
        struct cache_entry **cache_end;
        int dtype = DT_DIR;
        int ret = is_excluded_from_list(prefix->buf, prefix->len,
-                                       basename, &dtype, el);
+                                       basename, &dtype, el, &the_index);
        int rc;
 
        strbuf_addch(prefix, '/');
@@ -1171,7 +1171,7 @@ static int clear_ce_flags_1(struct cache_entry **cache, int nr,
                /* Non-directory */
                dtype = ce_to_dtype(ce);
                ret = is_excluded_from_list(ce->name, ce_namelen(ce),
-                                           name, &dtype, el);
+                                           name, &dtype, el, &the_index);
                if (ret < 0)
                        ret = defval;
                if (ret > 0)
@@ -1251,7 +1251,7 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
                o->skip_sparse_checkout = 1;
        if (!o->skip_sparse_checkout) {
                char *sparse = git_pathdup("info/sparse-checkout");
-               if (add_excludes_from_file_to_list(sparse, "", 0, &el, 0) < 0)
+               if (add_excludes_from_file_to_list(sparse, "", 0, &el, NULL) < 0)
                        o->skip_sparse_checkout = 1;
                else
                        o->el = &el;