Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15

Re: [PATCH 2/5] Rework diff options

From: Timo Hirvonen <hidden>
Date: 2016-06-15 22:42:30

Timo Hirvonen [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -878,13 +867,13 @@ void diff_tree_combined(const unsigned c
 			num_paths++;
 	}
 	if (num_paths) {
-		if (opt->with_raw) {
-			int saved_format = opt->output_format;
-			opt->output_format = DIFF_FORMAT_RAW;
+		if (opt->output_fmt & OUTPUT_FMT_RAW) {
+			int saved_fmt = opt->output_fmt;
+			opt->output_fmt |= OUTPUT_FMT_RAW;
I have no idea if this is more right than this:

                        opt->output_fmt = OUTPUT_FMT_RAW;
quoted hunk ↗ jump to hunk
@@ -852,8 +852,8 @@ int setup_revisions(int argc, const char
 	if (revs->combine_merges) {
 		revs->ignore_merges = 0;
 		if (revs->dense_combined_merges &&
-		    (revs->diffopt.output_format != DIFF_FORMAT_DIFFSTAT))
-			revs->diffopt.output_format = DIFF_FORMAT_PATCH;
+		   !(revs->diffopt.output_fmt & OUTPUT_FMT_DIFFSTAT))
+			revs->diffopt.output_fmt |= OUTPUT_FMT_PATCH;
I'm not sure about this. Didn't really understand the code :)

-- 
http://onion.dynserv.net/~timo/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help