Merge branch 'sp/clip-read-write-to-8mb'
[gitweb.git] / builtin / diff.c
index 6bb41aff5d5ed8729373a654d509685c776dc069..2fb8c5dc0b6fdc97beb82f4dc3802a8f0dad8211 100644 (file)
@@ -140,7 +140,7 @@ static int builtin_diff_index(struct rev_info *revs,
                usage(builtin_diff_usage);
        if (!cached) {
                setup_work_tree();
-               if (read_cache_preload(revs->diffopt.pathspec.raw) < 0) {
+               if (read_cache_preload(&revs->diffopt.pathspec) < 0) {
                        perror("read_cache_preload");
                        return -1;
                }
@@ -242,7 +242,7 @@ static int builtin_diff_files(struct rev_info *revs, int argc, const char **argv
                revs->combine_merges = revs->dense_combined_merges = 1;
 
        setup_work_tree();
-       if (read_cache_preload(revs->diffopt.pathspec.raw) < 0) {
+       if (read_cache_preload(&revs->diffopt.pathspec) < 0) {
                perror("read_cache_preload");
                return -1;
        }
@@ -368,7 +368,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
        }
        if (rev.prune_data.nr) {
                /* builtin_diff_b_f() */
-               GUARD_PATHSPEC(&rev.prune_data, PATHSPEC_FROMTOP);
+               GUARD_PATHSPEC(&rev.prune_data, PATHSPEC_FROMTOP | PATHSPEC_LITERAL);
                if (!path)
                        path = rev.prune_data.items[0].match;
                paths += rev.prune_data.nr;