dir: revert work-around for retired dangerous behavior
[gitweb.git] / tree.c
diff --git a/tree.c b/tree.c
index c0e568c08f670c45ab9615af2a41bda43569b5fd..549e5883a01bb31010861aad991993772d238309 100644 (file)
--- a/tree.c
+++ b/tree.c
@@ -47,7 +47,7 @@ static int read_one_entry_quick(const unsigned char *sha1, const char *base, int
 }
 
 static int read_tree_1(struct tree *tree, struct strbuf *base,
-                      int stage, struct pathspec *pathspec,
+                      int stage, const struct pathspec *pathspec,
                       read_tree_fn_t fn, void *context)
 {
        struct tree_desc desc;
@@ -116,7 +116,7 @@ static int read_tree_1(struct tree *tree, struct strbuf *base,
 
 int read_tree_recursive(struct tree *tree,
                        const char *base, int baselen,
-                       int stage, struct pathspec *pathspec,
+                       int stage, const struct pathspec *pathspec,
                        read_tree_fn_t fn, void *context)
 {
        struct strbuf sb = STRBUF_INIT;