remote-hg: add test for big push
[gitweb.git] / unpack-trees.c
index 09e53df3b2a39e7ec8c7d601c5b8b8ae4de39b9a..ede4299b833378ef5a4d44dac181d54889343a27 100644 (file)
@@ -1026,10 +1026,6 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
                        o->el = ⪙
        }
 
-       if (o->dir) {
-               o->path_exclude_check = xmalloc(sizeof(struct path_exclude_check));
-               path_exclude_check_init(o->path_exclude_check, o->dir);
-       }
        memset(&o->result, 0, sizeof(o->result));
        o->result.initialized = 1;
        o->result.timestamp.sec = o->src_index->timestamp.sec;
@@ -1155,10 +1151,6 @@ int unpack_trees(unsigned len, struct tree_desc *t, struct unpack_trees_options
 
 done:
        clear_exclude_list(&el);
-       if (o->path_exclude_check) {
-               path_exclude_check_clear(o->path_exclude_check);
-               free(o->path_exclude_check);
-       }
        return ret;
 
 return_failed:
@@ -1375,7 +1367,7 @@ static int check_ok_to_remove(const char *name, int len, int dtype,
                return 0;
 
        if (o->dir &&
-           is_path_excluded(o->path_exclude_check, name, -1, &dtype))
+           is_excluded(o->dir, name, &dtype))
                /*
                 * ce->name is explicitly excluded, so it is Ok to
                 * overwrite it.