git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/5] Rework diff options

From
THTimo Hirvonen <tihirvon@gmail.com>
Date
Jun 23, 2006, 22:40 UTC
Message-ID
<20060624014021.ebce199e.tihirvon@gmail.com>
In-Reply-To
<20060624005252.c694e421.tihirvon@gmail.com>
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/
Previous: Timo HirvonenNext: Junio C Hamano
Message 3 of 8 in “git-merge: Don't use -p when outputting summary”
  1. 1/5 git-merge: Don't use -p when outputting summaryTimo Hirvonen, Jun 23, 2006
  2. 2/5 Rework diff optionsTimo Hirvonen, Jun 23, 2006
  3. Timo HirvonenJun 23, 2006
  4. Junio C HamanoJun 24, 2006
  5. Timo HirvonenJun 24, 2006
  6. 3/5 Set default diff output format after parsing command lineTimo Hirvonen, Jun 23, 2006
  7. 4/5 Make --raw option available for all diff commandsTimo Hirvonen, Jun 23, 2006
  8. 5/5 Add --patch option for diff-*Timo Hirvonen, Jun 23, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.