Re: [PATCH 2/5] Rework diff options
Timo Hirvonen <tihirvon@gmail.com> wrote:
Show 10 quoted lines
> @@ -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;
Show 8 quoted lines
> @@ -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/