add: convert to use parse_pathspec
[gitweb.git] / diff-lib.c
index 83d0cb8f8212aeb284edb4147d15288db8f0f0bd..d4e17f76620a46a659c7affcb3cd270f86b5a957 100644 (file)
@@ -424,7 +424,8 @@ static void do_oneway_diff(struct unpack_trees_options *o,
  * the fairly complex unpack_trees() semantic requirements, including
  * the skipping, the path matching, the type conflict cases etc.
  */
-static int oneway_diff(struct cache_entry **src, struct unpack_trees_options *o)
+static int oneway_diff(const struct cache_entry * const *src,
+                      struct unpack_trees_options *o)
 {
        const struct cache_entry *idx = src[0];
        const struct cache_entry *tree = src[1];
@@ -475,7 +476,6 @@ static int diff_cache(struct rev_info *revs,
        opts.dst_index = NULL;
        opts.pathspec = &revs->diffopt.pathspec;
        opts.pathspec->recursive = 1;
-       opts.pathspec->max_depth = -1;
 
        init_tree_desc(&t, tree->buffer, tree->size);
        return unpack_trees(1, &t, &opts);