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

Re: Not possible to see combined diff before committing a merge?

From
Jay Soffian <jaysoffian@gmail.com>
Date
Mar 18, 2010, 15:21 UTC
Message-ID
<76718491003180821x777df87j245d134e32ec90dc@mail.gmail.com>
In-Reply-To
<4BA1F880.2090100@drmicha.warpmail.net>

On Thu, Mar 18, 2010 at 5:55 AM, Michael J Gruber <git@drmicha.warpmail.net> wrote:

> If there are no conflicted files left you could do a throw-away commit
> with a temp index, but that looks ugly. Do we have a way of specifying a
> 3-way diff for some git diff --cc incarnation, i.e. pretending two
> commits to be the parents and a third (or index) to be the merge result?

It would seem that diff-index should take two <tree-ish>'s (it only takes one) to support this.

> Junio would probably say that by adding the merge resolution you declare
> that you're not interested in that part of the merge any more ;)

The use case is that I use mergetool when I have merges with very large conflicted regions that are too difficult to visualize using the merge and/or diff3 conflict style. But because these conflict resolutions are so difficult, I often want to look at the merge resolution in combined-diff style before committing.

The way I would have to do this today is:
- git mergetool <path>
- save the result in my visual merge tool and quit
- in a separate shell, use git diff to see the 3-way diff
- in the first shell, answer mergetool's prompt that it's okay to use the result

Hmm, maybe there should be an option for whether mergetool automatically add's the result for you.

Anyway, what I've noticed is that I've become gun shy about using "git add" myself during conflict resolution because as soon as I do, I lose some functionality compared to the unmerged state.

j.
Previous: Michael J Gruber
Message 3 of 3 in “Not possible to see combined diff before committing a merge?”
  1. Jay SoffianMar 18, 2010
  2. Michael J GruberMar 18, 2010
  3. Jay SoffianMar 18, 2010

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.