Thread (1 message) 1 message, 1 author, 2016-06-15

Re: Segfault with merge-tree on multiple Git versions

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:32

John Keeping [off-list ref] writes:
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".
Good.
Note that this will fail if there are conflicts and I don't know what
git-merge-tree will do in that case.
I _think_ Charlies's use case is to detect trivial merges to tell
the requestee that a merge request can be done on site, so failing
is fine when there are conflicts.  merge-tree should report
conflicts as well.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help