Merge branch 'nd/index-doc'
[gitweb.git] / tree-diff.c
index 45a3845c0a37ea5e77d0c7a206e449b78448e240..3954281f509bbed9a9b095ed92d24b67275fed82 100644 (file)
@@ -72,7 +72,7 @@ static void show_tree(struct diff_options *opt, const char *prefix,
                if (all_interesting)
                        show = 1;
                else {
-                       show = tree_entry_interesting(&desc->entry, base,
+                       show = tree_entry_interesting(&desc->entry, base, 0,
                                                      &opt->pathspec);
                        if (show == 2)
                                all_interesting = 1;
@@ -124,7 +124,7 @@ static void skip_uninteresting(struct tree_desc *t, struct strbuf *base,
                               struct diff_options *opt, int *all_interesting)
 {
        while (t->size) {
-               int show = tree_entry_interesting(&t->entry, base, &opt->pathspec);
+               int show = tree_entry_interesting(&t->entry, base, 0, &opt->pathspec);
                if (show == 2)
                        *all_interesting = 1;
                if (!show) {
@@ -146,6 +146,10 @@ int diff_tree(struct tree_desc *t1, struct tree_desc *t2,
        int all_t1_interesting = 0;
        int all_t2_interesting = 0;
 
+       /* Enable recursion indefinitely */
+       opt->pathspec.recursive = DIFF_OPT_TST(opt, RECURSIVE);
+       opt->pathspec.max_depth = -1;
+
        strbuf_init(&base, PATH_MAX);
        strbuf_add(&base, base_str, baselen);