From: Junio C Hamano <gitster@pobox.com>
To: Bert Wesarg <bert.wesarg@googlemail.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
git@vger.kernel.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: git-core: conflictstyle=diff3 doesn't actually use diff3 compatible format
Date: Sat, 06 Mar 2010 11:03:17 -0800 [thread overview]
Message-ID: <7vvdd9gtmy.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 36ca99e91003060457s6417f800uc7a3e126ee6b7d6f@mail.gmail.com
Bert Wesarg <bert.wesarg@googlemail.com> writes:
> rerere needs an isspace() after the specified marker length. So I
> assume it could live with extra cruft after the | marker and a space.
is_cmarker() is called with want_sp = 0 for '=======' and '|||||||', so
the current code accepts both "||||||| rubbish\n" and "|||||||\n".
Also, rerere sanitizes a diff3 style conflict into a merge style conflict
before writing a preimage to rr-cache for later comparison [*1*], so it
probably is Ok even if we changed it in a way that it no longer reads the
current output without " rubbish" after the marker. It appears that it is
already prepared to take either form, so we are probably safe here.
But I didn't check subcommands other than rerere that may read and act on
the conflict markers.
> BTW: Am I right, that rerere would need to handle my new conflict style too?
If we were to change the output, git needs to be prepared to see both the
output before and after the change and behave sensibly; it is not limited
to rerere.
For the reverse combined diff format, rerere probably needs to be taught
how to convert it as merge style conflict before computing the conflict
identifier and write it out in the preimage file, I think.
[Footnote]
*1* See 387c9d4 (rerere: understand "diff3 -m" style conflicts with the
original, 2008-08-29).
next prev parent reply other threads:[~2010-03-06 21:00 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100305215253.364.63583.reportbug@localhost>
2010-03-05 22:19 ` git-core: conflictstyle=diff3 doesn't actually use diff3 compatible format Jonathan Nieder
2010-03-05 22:31 ` Junio C Hamano
2010-03-06 12:57 ` Bert Wesarg
2010-03-06 19:03 ` Junio C Hamano [this message]
2010-03-08 4:54 ` Jonathan Nieder
2010-03-15 7:47 ` [PATCH/RFC 0/10] Add label for common ancestor to conflictstyle=diff3 Jonathan Nieder
2010-03-15 7:49 ` [PATCH 01/10] xdl_merge(): add optional ancestor label to diff3-style output Jonathan Nieder
2010-03-15 8:10 ` Junio C Hamano
2010-03-15 8:35 ` Jonathan Nieder
2010-03-15 8:37 ` Junio C Hamano
2010-03-15 7:51 ` [PATCH 02/10] merge-file --diff3: add a label for ancestor Jonathan Nieder
2010-03-15 7:52 ` [PATCH 03/10] ll_merge(): add ancestor label parameter for diff3-style output Jonathan Nieder
2010-03-15 7:55 ` [PATCH 04/10] checkout --conflict=diff3: add a label for ancestor Jonathan Nieder
2010-03-15 8:20 ` Junio C Hamano
2010-03-15 8:32 ` Jonathan Nieder
2010-03-15 7:56 ` [PATCH 05/10] merge_file(): add comment explaining behavior wrt conflict style Jonathan Nieder
2010-03-15 8:00 ` [PATCH 06/10] merge_trees(): add ancestor label parameter for diff3-style output Jonathan Nieder
2010-03-15 8:00 ` [PATCH 07/10] tests: document format of conflicts from checkout -m Jonathan Nieder
2010-03-15 8:01 ` [PATCH 08/10] checkout -m --conflict=diff3: add a label for ancestor Jonathan Nieder
2010-03-15 8:05 ` [PATCH 09/10] cherry-pick: " Jonathan Nieder
2010-03-15 8:07 ` [PATCH 10/10] merge-recursive: " Jonathan Nieder
2010-03-15 8:29 ` Junio C Hamano
2010-03-15 13:18 ` Stefan Monnier
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=7vvdd9gtmy.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=bert.wesarg@googlemail.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=monnier@iro.umontreal.ca \
/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).