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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 31, 2010 at 11:39 PM, Johannes Sixt <j.sixt@xxxxxxxxxxxxx> wrote:
> Am 3/31/2010 13:12, schrieb Jon Seymour:
>>> 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.
>>>
>>
>> I think you may have missed the point of my patch.
>>
>> The successfully merged lines may be uninteresting from the point of
>> deciding what I should *do* but they
>> are highly relevant to the question of what I really, really should *not* do.
>
> How would you decide that if you cannot read the information that is
> presented to you?
>
> Can you tell without thinking for 10 seconds which of these two changes is
> lost if you choose "Use local version"?
>
> @@@ ... @@@
>  x
>  +foo
>  y
> @@@ ... @@@
>  a
> - bar
>  b
>
> Oh, it's easy for the conflicted part of the diff, which you'll see
> elsewhere as well:
>
> @@@ ... @@@
>  r
> ++<<<<<<< HEAD
>  +foo
> ++=======
> + bar
> ++>>>>>>> some-branch
>  s
>
> Do not forget that in a case (like mine) where the non-condensed diff is
> actually huge, the conflict markers would no exactly be easy to find in
> the diff.

But that's exactly the point - not to make the choice easy, but to
make it obvious that the choice is *not easy*.

The problem is that as it stands the user things the only choice is
between choosing "foo" and choosing "bar".

> ++<<<<<<< HEAD
>  +foo
> ++=======
> + bar
> ++>>>>>>> some-branch

This is a false choice but it is not obviously so.

The point of using diff -c is *precisely* to help the user understand
that it isn't a choice between foo and bar, but a choice
between losing all the changes that came with foo and all the changes
that came with bar.


> And therefore I suggest to disable these options.
>

I agree that this would be a better solution than leaving the behaviour as is.

> Which are those very simplest cases that you are referring to? If you mean
> modify/delete conflicts, then I indeed would like to keep the options for
> them.

The simplest case is when the presented diff presents the *whole*
difference between the local and remote branches.

As it stands, the gui can mislead the user into believing that the
presented diff is the whole difference and that their only
choice is between foo and bar.

Sure, users who have been bitten by this misapprehension will learn,
but it is hard lesson to learn.

>
> That said, your earlier patch that presented the diff against HEAD was not
> bad after all.

I prefer the -c version - not because the output is easy to
understand, but precisely because it gives pause.

jon.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]