git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 5/8] rerere: use ll_merge() instead of using xdl_merge()
Date: Sun, 17 Jan 2010 12:52:38 +0100	[thread overview]
Message-ID: <201001171252.38826.j6t@kdbg.org> (raw)
In-Reply-To: <1263721144-18605-6-git-send-email-gitster@pobox.com>

On Sonntag, 17. Januar 2010, Junio C Hamano wrote:
> This allows us to pay attention to the attribute settings and custom
> merge driver the user sets up.

I do not think that this change is necessary; I even think that it is wrong, 
in particular, custom merge drivers should *not* be used anymore.

The code path is about merging the changes between preimage and postimage into 
a file that has conflict markers (thisimage). At the time when this happens, 
all three images have already been processed by the custom merge driver.

Consider this preimage:

<foo><bar>
<<<<<<<
</bar>
=======
<baz>
text
</baz></bar>
>>>>>>>
<more text="here" />
</foo>

and a custom XML merge driver. With your change, you expect that the merge 
driver knows how to treat syntactically incorrect XML (the "<<<<<<<" 
and ">>>>>>>").

Of course, without this change, we do expect that the postimage has 
practically everything outside the conflict markers unchanged[*], otherwise 
the ll_merge() will fail.

But so would a custom XML driver that does not know how to read conflict 
markers.

[*] Which is perhaps an assumption that is easily violated. For example, the 
XML editor used to resolve the conflict could have inserted line-breaks at 
completely different spots than in the conflicted preimage.

-- Hannes

  reply	other threads:[~2010-01-17 11:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-17  9:38 [PATCH 0/8] Rescuing repeated merge of Documentation/git-merge.txt Junio C Hamano
2010-01-17  9:38 ` [PATCH 1/8] git_attr(): fix function signature Junio C Hamano
2010-01-17  9:38 ` [PATCH 2/8] xdl_merge(): introduce xmparam_t for merge specific parameters Junio C Hamano
2010-01-17  9:38 ` [PATCH 3/8] xdl_merge(): allow passing down marker_size in xmparam_t Junio C Hamano
2010-01-17  9:39 ` [PATCH 4/8] merge-tree: use ll_merge() not xdl_merge() Junio C Hamano
2010-01-17  9:39 ` [PATCH 5/8] rerere: use ll_merge() instead of using xdl_merge() Junio C Hamano
2010-01-17 11:52   ` Johannes Sixt [this message]
2010-01-17 19:01     ` Junio C Hamano
2010-01-17 20:40       ` Johannes Sixt
2010-01-17  9:39 ` [PATCH 6/8] conflict-marker-size: new attribute Junio C Hamano
2010-01-17  9:39 ` [PATCH 7/8] rerere: prepare for customizable conflict marker length Junio C Hamano
2010-01-17  9:39 ` [PATCH 8/8] rerere: honor conflict-marker-size attribute Junio C Hamano
2010-01-17 10:07 ` [PATCH 0/8] Rescuing repeated merge of Documentation/git-merge.txt Junio C Hamano

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=201001171252.38826.j6t@kdbg.org \
    --to=j6t@kdbg.org \
    --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).