From: "Stefan Frühwirth" <stefan.fruehwirth@uni-graz.at>
To: Jeff King <peff@peff.net>
Cc: Eric Sunshine <sunshine@sunshineco.com>, <git@vger.kernel.org>
Subject: Re: [PATCH] merge_blobs: use strbuf instead of manually-sized mmfile_t
Date: Fri, 19 Feb 2016 13:43:49 +0100 [thread overview]
Message-ID: <56C70E05.8020508@uni-graz.at> (raw)
In-Reply-To: <20160216203526.GA27484@sigill.intra.peff.net>
On 2016-02-16 at 21:35 Jeff King wrote:
> Yeah, I agree there isn't a great solution in git here. Using "git
> merge" is definitely wrong if you don't want to touch HEAD or have a
> working directory. If you _just_ care about doing the tree-level merge
> without content-level merging inside blobs, you can do it in the index
> like:
>
> export GIT_INDEX_FILE=temp.index
> base=$(git merge-base $ours $theirs)
> git read-tree -i -m --aggressive $base $ours $theirs
>
> If you want to do content-level resolving on top of that, you can do it
> with:
>
> git merge-index git-merge-one-file -a
>
> though it will need a temp directory to write out conflicts and
> resolved content.
That's an interesting alternative, I'll give it a try!
> I don't think merge-tree is at all the wrong tool, in the sense that it
> is being used as designed. But it is using merge code that is different
> from literally the rest of git. That means you're going to run into
> weird bugs (like this one), and places where it does not behave the
> same. This add/add case, for instance, is usually a conflict in a
> normal git merge (try your test case with "git merge"), but merge-tree
> tries to do a partial content merge with a base that never actually
> existed[1].
Thank you for clarifying, I understand.
> So I worry that merge-tree's existence is a disservice to people like
> Chris, because there is no disclaimer that it is effectively
> unmaintained.
I agree, I don't want to advocate continuing development under these
conditions.
> So merge-blobs.c:generate_common_file() is definitely buggy, but I think
> the bug gets unintentionally canceled out by the follow-on three-way
> merge. Which is...good, I guess?
Well I don't know how to handle all this with respect to my original
problem, but that's completely off topic. Anyway: Thanks!
Stefan
next prev parent reply other threads:[~2016-02-19 12:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-15 21:39 malloc memory corruption on merge-tree with leading newline Stefan Frühwirth
2016-02-15 21:54 ` Stefan Frühwirth
2016-02-16 1:12 ` [PATCH] merge_blobs: use strbuf instead of manually-sized mmfile_t Jeff King
2016-02-16 5:09 ` Eric Sunshine
2016-02-16 5:50 ` Jeff King
2016-02-16 12:14 ` Stefan Frühwirth
2016-02-16 20:35 ` Jeff King
2016-02-19 12:43 ` Stefan Frühwirth [this message]
2016-02-16 21:27 ` Junio C Hamano
2016-02-19 12:48 ` Stefan Frühwirth
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=56C70E05.8020508@uni-graz.at \
--to=stefan.fruehwirth@uni-graz.at \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=sunshine@sunshineco.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).