difftool: display the number of files in the diff queue in the prompt
[gitweb.git] / builtin / diff.c
index bb84ba0e4694a6ef2cda7898ec9c61fa80bf74ae..adb93a9efa5ed9b97a08224e46f6fbaf680343e6 100644 (file)
@@ -169,7 +169,7 @@ static int builtin_diff_tree(struct rev_info *revs,
        if (ent1->item->flags & UNINTERESTING)
                swap = 1;
        sha1[swap] = ent0->item->sha1;
-       sha1[1-swap] = ent1->item->sha1;
+       sha1[1 - swap] = ent1->item->sha1;
        diff_tree_sha1(sha1[0], sha1[1], "", &revs->diffopt);
        log_tree_diff_flush(revs);
        return 0;
@@ -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;