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