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

Re: Common ancestor in merge diffs?

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Jan 26, 2009, 19:06 UTC
Message-ID
<alpine.LNX.1.00.0901261402120.19665@iabervon.org>
In-Reply-To
<alpine.DEB.1.00.0901261958320.25749@intel-tinevez-2-302>
On Mon, 26 Jan 2009, Johannes Schindelin wrote:
Show 19 quoted lines
> Hi,
> 
> On Mon, 26 Jan 2009, Daniel Barkalow wrote:
> 
> > I was just doing an annoying merge (I'd reorganized code while other 
> > people made changes to it), and I kept having the problem that it was hard 
> > to figure out what each side had done. Is there some way to ask git for 
> > the diffs between the common ancestor (which is unique in my case, so it's 
> > actually useful) and each of the sides of the merge?
> 
> How about
> 
> 	git diff HEAD...MERGE_HEAD
> 
> and
> 
> 	git diff MERGE_HEAD...HEAD
> 
> ?  I might have misunderstood, though.

That's definitely helpful information (and I'd forgotten about it; I was only thinking of the index). It would be helpful to get it in --cc form, though, rather than as two independant diffs. And it seems somewhat wasteful or something to not use the information in the index, although it's hard to get worked up about with git being blindingly fast anyway.

	-Daniel
*This .sig left intentionally blank*
Previous: Johannes SchindelinNext: Linus Torvalds
Message 3 of 7 in “Common ancestor in merge diffs?”
  1. Daniel BarkalowJan 26, 2009
  2. Johannes SchindelinJan 26, 2009
  3. Daniel BarkalowJan 26, 2009
  4. Linus TorvaldsJan 26, 2009
  5. Daniel BarkalowJan 26, 2009
  6. Linus TorvaldsJan 26, 2009
  7. Junio C HamanoJan 26, 2009

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.