DIFF_FORMAT_RAW is not default anymore
authorTimo Hirvonen <tihirvon@gmail.com>
Sat, 24 Jun 2006 17:25:08 +0000 (20:25 +0300)
committerJunio C Hamano <junkio@cox.net>
Mon, 26 Jun 2006 21:58:41 +0000 (14:58 -0700)
diff_setup() used to initialize output_format to DIFF_FORMAT_RAW.  Now
the default is 0 (no output) so don't compare against DIFF_FORMAT_RAW to
see if any diff format command line flags were given.

Signed-off-by: Timo Hirvonen <tihirvon@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-log.c
revision.c

index c1bf9d4ee1d2f0fa5ec362e5364a1e99d587f254..4e5273aecf8680c6ee522a127bc988ea587e1494 100644 (file)
@@ -24,11 +24,8 @@ static int cmd_log_wc(int argc, const char **argv, char **envp,
        rev->verbose_header = 1;
        argc = setup_revisions(argc, argv, rev, "HEAD");
        if (rev->always_show_header) {
-               if (rev->diffopt.pickaxe || rev->diffopt.filter) {
+               if (rev->diffopt.pickaxe || rev->diffopt.filter)
                        rev->always_show_header = 0;
-                       if (rev->diffopt.output_format == DIFF_FORMAT_RAW)
-                               rev->diffopt.output_format = DIFF_FORMAT_NO_OUTPUT;
-               }
        }
 
        if (argc > 1)
index b963f2adfd92050310f7327e1ee10e21d5996a7c..ae4ca8200367a919ed5166a96624abbbe8fef15c 100644 (file)
@@ -851,8 +851,7 @@ 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 &&
-                   (revs->diffopt.output_format != DIFF_FORMAT_DIFFSTAT))
+               if (revs->dense_combined_merges && !revs->diffopt.output_format)
                        revs->diffopt.output_format = DIFF_FORMAT_PATCH;
        }
        revs->diffopt.abbrev = revs->abbrev;