dir.c: remove an implicit dependency on the_index in pathspec code
[gitweb.git] / archive.c
index 31de1bba52b8dad338b8c2f5d995af56fa137df5..c81e35bf2359e898a1f47b48346dfd2ebbfe6dbe 100644 (file)
--- a/archive.c
+++ b/archive.c
@@ -313,7 +313,7 @@ static int reject_entry(const struct object_id *oid, struct strbuf *base,
                struct strbuf sb = STRBUF_INIT;
                strbuf_addbuf(&sb, base);
                strbuf_addstr(&sb, filename);
-               if (!match_pathspec(context, sb.buf, sb.len, 0, NULL, 1))
+               if (!match_pathspec(&the_index, context, sb.buf, sb.len, 0, NULL, 1))
                        ret = READ_TREE_RECURSIVE;
                strbuf_release(&sb);
        }