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

Re: [PATCH v3 0/2] git-gui: change to display the combined diff in the case of conflicts.

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Mar 31, 2010, 07:20 UTC
Message-ID
<4BB2F7A0.6020702@viscovery.net>
In-Reply-To
<2cfc40321003300834w59532e58m13d42acce4f2c5ce@mail.gmail.com>
Am 3/30/2010 17:34, schrieb Jon Seymour:
Show 17 quoted lines
> This variant of the patch uses git diff -c instead of git diff HEAD,
> at Johannes Sixt's suggestion.
> 
> The diff displayed in case of a merge conflict now shows the
> differences between the merge result and each of the local and remote
> heads and thus now also allows the user to assess the consequences of
> "Use Remote Version" by showing how the merge result affects the state
> of the local branch.
> 
> I have avoided using gmail client to forward this version of  patch
> because of documented word-wrapping issues, so hopefully this will
> apply cleanly.
> 
> [PATCH v3 1/2] git-gui: Introduce is_unmerged global variable to
> encapsulate its derivation.
> [PATCH v3 2/2] git-gui: change to display the combined diff in the
> case of conflicts.

I looked at the result, but it does not convince me. In my case, I have a large file that has many changes between the "maint" and "master" branches. Whenever there are conflicts after merging "maint" to "master", I see all these changes, and really they *are* uninteresting.

But I, too, think that to offer "Use local version" and "Use remote version" is *very* dangerous in a modify/modify conflict, particularly to new-comers. I have only ever found these commands useful in the case of modify/delete conflicts (and they are actually very handy in this case).

Even when the user sees all changes and can make a decision whether "Use local" or "remote version" is really wanted, it is not at all obvious which of the changes shown belong the "local" and which to "remote".

Therefore, I suggest to keep the original --cc display, but do not offer "Use local version" and "Use remote version" when there is a modify/modify conflict. The user is already offered "Run mergetool", and it is the safe option besides editing the file.

-- Hannes
Previous: Jon SeymourNext: Jon Seymour
Message 2 of 10 in “git-gui: change to display the combined diff in the case of conflicts.”
  1. 0/2 git-gui: change to display the combined diff in the case of conflicts.Jon Seymour, Mar 30, 2010
  2. Johannes SixtMar 31, 2010
  3. Jon SeymourMar 31, 2010
  4. Johannes SixtMar 31, 2010
  5. Jon SeymourMar 31, 2010
  6. Jon SeymourMar 31, 2010
  7. Johannes SixtMar 31, 2010
  8. Jon SeymourMar 31, 2010
  9. Johannes SixtApr 2, 2010
  10. Jon SeymourApr 4, 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.