send-email: recognize absolute path on Windows
[gitweb.git] / tree-diff.c
index 21a50d8ed3bc6fcfd92e4e00a23a80a20f869f9f..456660c7a29ef75030141721205f34134daea51c 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
@@ -254,7 +254,9 @@ static void try_to_follow_renames(struct tree_desc *t1, struct tree_desc *t2, co
                        path[0] = p->one->path;
                        path[1] = NULL;
                        free_pathspec(&opt->pathspec);
-                       parse_pathspec(&opt->pathspec, PATHSPEC_ALL_MAGIC, 0, "", path);
+                       parse_pathspec(&opt->pathspec,
+                                      PATHSPEC_ALL_MAGIC & ~PATHSPEC_LITERAL,
+                                      PATHSPEC_LITERAL_PATH, "", path);
 
                        /*
                         * The caller expects us to return a set of vanilla