X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=revision.c;h=48756b5d4466d06123922573e4330fc4344c1dcb;hb=c05ef93879696638406cad5be54be577a2666d04;hp=33d092c3c4b4c08fb6f39228e464219df4cb4f1c;hpb=a017f27dcbe6b4f9c8760ccc8a7e248c680b6a23;p=git.git diff --git a/revision.c b/revision.c index 33d092c3c..48756b5d4 100644 --- a/revision.c +++ b/revision.c @@ -1209,8 +1209,6 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch opts = diff_opt_parse(&revs->diffopt, argv+i, argc-i); if (opts > 0) { - if (strcmp(argv[i], "-z")) - revs->diff = 1; i += opts - 1; continue; } @@ -1254,6 +1252,14 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch add_pending_object_with_mode(revs, object, def, mode); } + /* Did the user ask for any diff output? Run the diff! */ + if (revs->diffopt.output_format & ~DIFF_FORMAT_NO_OUTPUT) + revs->diff = 1; + + /* Pickaxe and rename following needs diffs */ + if (revs->diffopt.pickaxe || revs->diffopt.follow_renames) + revs->diff = 1; + if (revs->topo_order) revs->limited = 1;