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

Re: Union diff

From
Junio C Hamano <junkio@cox.net>
Date
Apr 9, 2006, 09:45 UTC
Message-ID
<7vslonaxq6.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060326102100.GF18185@pasky.or.cz>
Petr Baudis <pasky@ucw.cz> writes:
Show 11 quoted lines
>   Now, the -c option documentation says:
>
> 	  It shows the differences from each of the parents to the merge
> 	result simultaneously, instead of showing pairwise diff between
> 	a parent and the result one at a time, which '-m' option output
> 	does.
>
>   This sounds as exactly what I want. Well, the only problem is that the
> same diff command as above with -c option added produces no diff at all,
> just the header and commit messages. Did I misunderstand the -c
> description and does it do something different?

The --combined diff option is to show merges more sensibly than plain -m option. Now, the definition of "sensible" is to say that a merge is not interesting if it takes a version from one of the parents. The paths whose results do not match any of the parents' version are deemed interesting and are shown.

I think you could tweak and give an option to intersect_paths() in combine-diff.c, so that paths that match one of the parents are also included in the output. I haven't thought about it too much, but my gut feeling is it would not be very involved change.

Previous: Petr BaudisNext: Petr Baudis
Message 2 of 3 in “Union diff”
  1. Petr BaudisMar 26, 2006
  2. Junio C HamanoApr 9, 2006
  3. Improve the git-diff-tree -c/-cc documentationPetr Baudis, Apr 9, 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.