Re: [RFC] (reverse) combined diff conflict style

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

 



[ Sorry, I removed the list by mistake. CC'ed again ]

On Fri, Feb 19, 2010 at 06:30, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Bert Wesarg <bert.wesarg@xxxxxxxxxxxxxx> writes:
>> I use two programmed short-cuts in my editor for this. The first
>> 'applies' the diff, i.e. it keeps all lines prefixed with ' ' or '+'
>> and deletes lines with '-', and then removes the first column. The
>> second 'reverses' a diff, i.e. exchanges '+' with '-' and vice versa.
>> With these two operations I find it easier to resolve the conflict
>> than with the mege/diff3 presentation.
>>
>> I'm also convinced, that it is currently impossible to implement this
>> conflict style in the xdiff library. So it will probably be forever
>> some 'external solution'.
>
> Why not?
>
> IIUC, your approach is to postprocess output diff3 style merge.
>
>  - First define your style as a new "conflict style" and store it in
>   git_xmerge_style to pass it around.  "checkout --conflict=bert" would
>   learn this style automatically.
>
>  - In ll_xdl_merge(), we usually call xdl_merge() and return directly its
>   return value.  When style is "bert", instead of doing that, you pass
>   "diff3 style" and drive xdl_merge(), _but_ you do not return.  Instead,
>   you do your postprocessing right there and then return the result.
Thanks for this pointer. That looks really doable. Will report back later.

Bert
--
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]