From: Bert Wesarg <bert.wesarg@googlemail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC] (reverse) combined diff conflict style
Date: Fri, 19 Feb 2010 08:15:15 +0100 [thread overview]
Message-ID: <36ca99e91002182315i25ad527dt553d79628734b02f@mail.gmail.com> (raw)
In-Reply-To: <7vocjlx056.fsf@alter.siamese.dyndns.org>
[ Sorry, I removed the list by mistake. CC'ed again ]
On Fri, Feb 19, 2010 at 06:30, Junio C Hamano <gitster@pobox.com> wrote:
> Bert Wesarg <bert.wesarg@googlemail.com> 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
prev parent reply other threads:[~2010-02-19 7:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-18 19:36 [RFC] (reverse) combined diff conflict style Bert Wesarg
2010-02-18 20:34 ` Junio C Hamano
[not found] ` <36ca99e91002181243y371ce2f5i7136d8fbe6837b6b@mail.gmail.com>
[not found] ` <7vocjlx056.fsf@alter.siamese.dyndns.org>
2010-02-19 7:15 ` Bert Wesarg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=36ca99e91002182315i25ad527dt553d79628734b02f@mail.gmail.com \
--to=bert.wesarg@googlemail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).