Re: [RFC] (reverse) combined diff conflict style
From: Bert Wesarg <hidden>
Date: 2016-06-15 22:48:18
[ Sorry, I removed the list by mistake. CC'ed again ] On Fri, Feb 19, 2010 at 06:30, Junio C Hamano [off-list ref] wrote:
Bert Wesarg [off-list ref] writes:quoted
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