From: John Keeping <john@keeping.me.uk>
To: Jed Brown <jed@59A2.org>
Cc: Charlie Smurthwaite <charlie@atechmedia.com>,
Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org, Thomas Rast <trast@inf.ethz.ch>
Subject: Re: Segfault with merge-tree on multiple Git versions
Date: Wed, 27 Mar 2013 19:45:21 +0000 [thread overview]
Message-ID: <20130327194521.GQ2286@serenity.lan> (raw)
In-Reply-To: <87zjxo3b7b.fsf@59A2.org>
On Wed, Mar 27, 2013 at 02:16:24PM -0500, Jed Brown wrote:
> Charlie Smurthwaite <charlie@atechmedia.com> writes:
>
> > Yes, I would need to be able to do this on a bare repo for my use case.
>
> And if it's on the server, you don't want this to be observable, so
> you don't want HEAD to move around. I don't know a better way than:
>
> $ git clone --shared -b upstream-branch bare-repo.git /tmp/merge-repo
> $ cd /tmp/merge-repo
> $ git pull URL incoming-branch
>
> Cloning with --shared just writes a path into .git/objects/info/alternatives
> and it doesn't need to be on the same file system (unlike --local).
>
> Since 'git merge-tree' just works with trees, it has less information
> than 'git merge'.
You could use a temporary index and do something like:
rm -f TMP_INDEX
GIT_INDEX_FILE=TMP_INDEX
export GIT_INDEX_FILE
git read-tree -m $base $ours $theirs &&
git merge-index git-merge-one-file -a
then inspect that with "git diff-index --cached $ours".
Note that this will fail if there are conflicts and I don't know what
git-merge-tree will do in that case.
next prev parent reply other threads:[~2013-03-27 19:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-27 15:29 Segfault with merge-tree on multiple Git versions Charlie Smurthwaite
2013-03-27 15:53 ` thomas
2013-03-27 15:58 ` John Keeping
2013-03-27 16:05 ` Thomas Rast
2013-03-27 16:33 ` Junio C Hamano
2013-03-27 17:06 ` Junio C Hamano
2013-03-27 17:17 ` Charlie Smurthwaite
2013-03-27 17:52 ` Charlie Smurthwaite
2013-03-27 18:06 ` Jed Brown
2013-03-27 18:46 ` Charlie Smurthwaite
2013-03-27 19:16 ` Jed Brown
2013-03-27 19:45 ` John Keeping [this message]
2013-03-27 20:01 ` Jeff King
2013-03-27 21:10 ` Charlie Smurthwaite
2013-03-27 20:04 ` 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=20130327194521.GQ2286@serenity.lan \
--to=john@keeping.me.uk \
--cc=charlie@atechmedia.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jed@59A2.org \
--cc=trast@inf.ethz.ch \
/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).