X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=revision.c;h=4381d455e4579fb2c6c598cee5e9252277590b28;hb=0fe7c1de16f71312e6adac4b85bddf0d62a47168;hp=113dd5a89fc03ff17b04443f2ac7148b4c36af33;hpb=b8950769b8b91d634ec549fd1af792ccc1864f79;p=git.git diff --git a/revision.c b/revision.c index 113dd5a8..4381d455 100644 --- a/revision.c +++ b/revision.c @@ -664,6 +664,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch } if (!strcmp(arg, "-c")) { revs->diff = 1; + revs->dense_combined_merges = 0; revs->combine_merges = 1; continue; } @@ -752,17 +753,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; } @@ -789,7 +788,8 @@ 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; } revs->diffopt.abbrev = revs->abbrev;