File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,19 @@ MRC=$head MSG= PARENT="-p $head"
4848MRT=$( git-write-tree)
4949CNT=1 ; # counting our head
5050NON_FF_MERGE=0
51+ OCTOPUS_FAILURE=0
5152for SHA1 in $remotes
5253do
54+ case " $OCTOPUS_FAILURE " in
55+ 1)
56+ # We allow only last one to have a hand-resolvable
57+ # conflicts. Last round failed and we still had
58+ # a head to merge.
59+ echo " Automated merge did not work."
60+ echo " Should not be doing an Octopus."
61+ exit 2
62+ esac
63+
5364 common=$( git-merge-base --all $MRC $SHA1 ) ||
5465 die " Unable to find common commit with $SHA1 "
5566
8495 if test $? -ne 0
8596 then
8697 echo " Simple merge did not work, trying automatic merge."
87- git-merge-index -o git-merge-one-file -a || {
88- echo " Not trivially merged."
89- echo " Should not be doing an Octopus."
90- exit 2
91- }
98+ git-merge-index -o git-merge-one-file -a ||
99+ OCTOPUS_FAILURE=1
92100 next=$( git-write-tree 2> /dev/null)
93101 fi
94102
103111 MRT=$next
104112done
105113
106- exit 0
114+ exit " $OCTOPUS_FAILURE "
You can’t perform that action at this time.
0 commit comments