Merge branch 'bc/http-backend-allow-405'
[gitweb.git] / tree-diff.c
index e1145c60e7a82e2c6422494603fbb4e01f865cf4..ccf9d7c8fd41c00f13136ef99d24180b36a098c1 100644 (file)
@@ -202,7 +202,7 @@ static void try_to_follow_renames(struct tree_desc *t1, struct tree_desc *t2, co
         * path. Magic that matches more than one path is not
         * supported.
         */
-       GUARD_PATHSPEC(&opt->pathspec, PATHSPEC_FROMTOP);
+       GUARD_PATHSPEC(&opt->pathspec, PATHSPEC_FROMTOP | PATHSPEC_LITERAL);
 #if 0
        /*
         * We should reject wildcards as well. Unfortunately we
@@ -224,7 +224,7 @@ static void try_to_follow_renames(struct tree_desc *t1, struct tree_desc *t2, co
        DIFF_OPT_SET(&diff_opts, RECURSIVE);
        DIFF_OPT_SET(&diff_opts, FIND_COPIES_HARDER);
        diff_opts.output_format = DIFF_FORMAT_NO_OUTPUT;
-       diff_opts.single_follow = opt->pathspec.raw[0];
+       diff_opts.single_follow = opt->pathspec.items[0].match;
        diff_opts.break_opt = opt->break_opt;
        diff_opts.rename_score = opt->rename_score;
        diff_setup_done(&diff_opts);
@@ -243,7 +243,7 @@ static void try_to_follow_renames(struct tree_desc *t1, struct tree_desc *t2, co
                 * the future!
                 */
                if ((p->status == 'R' || p->status == 'C') &&
-                   !strcmp(p->two->path, opt->pathspec.raw[0])) {
+                   !strcmp(p->two->path, opt->pathspec.items[0].match)) {
                        const char *path[2];
 
                        /* Switch the file-pairs around */