Code

Merge branch 'jc/cache-tree' into next
[git.git] / revision.c
index 3cd6a2ed9f978776b2a021747f3f0995ebb70b28..f2a9f25fe11f3883281ea5fdd783700056fd5c6e 100644 (file)
@@ -152,6 +152,7 @@ static struct commit *handle_commit(struct rev_info *revs, struct object *object
                if (parse_commit(commit) < 0)
                        die("unable to parse commit %s", name);
                if (flags & UNINTERESTING) {
+                       commit->object.flags |= UNINTERESTING;
                        mark_parents_uninteresting(commit);
                        revs->limited = 1;
                }
@@ -498,7 +499,6 @@ void init_revisions(struct rev_info *revs)
        revs->topo_setter = topo_sort_default_setter;
        revs->topo_getter = topo_sort_default_getter;
 
-       revs->header_prefix = "";
        revs->commit_format = CMIT_FMT_DEFAULT;
 
        diff_setup(&revs->diffopt);
@@ -675,12 +675,10 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
                        }
                        if (!strcmp(arg, "-v")) {
                                revs->verbose_header = 1;
-                               revs->header_prefix = "diff-tree ";
                                continue;
                        }
                        if (!strncmp(arg, "--pretty", 8)) {
                                revs->verbose_header = 1;
-                               revs->header_prefix = "diff-tree ";
                                revs->commit_format = get_commit_format(arg+8);
                                continue;
                        }
@@ -754,17 +752,15 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
                        arg++;
                }
                if (get_sha1(arg, sha1) < 0) {
-                       struct stat st;
                        int j;
 
                        if (seen_dashdash || local_flags)
                                die("bad revision '%s'", arg);
 
                        /* If we didn't have a "--", all filenames must exist */
-                       for (j = i; j < argc; j++) {
-                               if (lstat(argv[j], &st) < 0)
-                                       die("'%s': %s", argv[j], strerror(errno));
-                       }
+                       for (j = i; j < argc; j++)
+                               verify_filename(revs->prefix, argv[j]);
+
                        revs->prune_data = get_pathspec(revs->prefix, argv + i);
                        break;
                }
@@ -791,11 +787,10 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
        }
        if (revs->combine_merges) {
                revs->ignore_merges = 0;
-               if (revs->dense_combined_merges)
+               if (revs->dense_combined_merges &&
+                   (revs->diffopt.output_format != DIFF_FORMAT_DIFFSTAT))
                        revs->diffopt.output_format = DIFF_FORMAT_PATCH;
        }
-       if (revs->diffopt.output_format == DIFF_FORMAT_PATCH)
-               revs->diffopt.recursive = 1;
        revs->diffopt.abbrev = revs->abbrev;
        diff_setup_done(&revs->diffopt);