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

Re: log -p hides changes in merge commit

From
PSPhillip Susi <psusi@cfl.rr.com>
Date
Jan 7, 2011, 19:27 UTC
Message-ID
<4D276926.2020407@cfl.rr.com>
In-Reply-To
<20110106210438.GB15090@burratino>
On 1/6/2011 4:04 PM, Jonathan Nieder wrote:
Show 20 quoted lines
> In case (1), -c will show a "combined diff" for files where master
> does not match either the old master or topic.  --cc, on the other
> hand, will correctly suppress these uninteresting diffs.
> 
> In case (2), -c will show a noisy "combined diff" as before.
> --cc will show a combined diff when the changes from both parents
> touch nearby code, even if it merged trivially.
> 
> In case (3), -c and --cc will show the semantically boring but
> syntactically interesting merge.
> 
> Case (4) is underspecified.  So let's give a more precise example:
> the old master and topic tried to fix the same bug in two incompatible
> ways.  When merging, I decide I like the topic's way better, so I
> resolve conflicts in favor of the topic.  Hopefully all unrelated
> changes on master were preserved!
> 
> In this case, -c and --cc will very likely show nothing at all.
> Each file matches one of the two parents (old master or topic) so
> there is no easy way to distinguish the case from (0) or (1).

That does help me understand the difference between -c and -cc, but I still don't see why one or the other is not the default behavior of log -p, instead of opting to never show anything at all for merges?

Previous: Jonathan NiederNext: Junio C Hamano
Message 5 of 6 in “log -p hides changes in merge commit”
  1. Phillip SusiJan 6, 2011
  2. Junio C HamanoJan 6, 2011
  3. Phillip SusiJan 6, 2011
  4. Jonathan NiederJan 6, 2011
  5. Phillip SusiJan 7, 2011
  6. Junio C HamanoJan 7, 2011

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.