3 # Copyright (c) 2005 Linus Torvalds
4 # Copyright (c) 2005 Junio C Hamano
6 # Resolve two trees, using enhancd multi-base read-tree.
8 # The first parameters up to -- are merge bases; the rest are heads.
9 bases
= head= remotes
= sep_seen
=
12 case ",$sep_seen,$head,$arg," in
20 remotes
="$remotes$arg "
28 # Give up if we are given more than two remotes -- not handling octopus.
34 git-update-index
--refresh 2>/dev
/null
35 git-read-tree
-u -m $bases $head $remotes ||
exit 2
36 echo "Trying simple merge."
37 if result_tree
=$
(git-write-tree
2>/dev
/null
)
41 echo "Simple merge failed, trying Automatic merge."
42 if git-merge-index
-o git-merge-one-file
-a