summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9e9b267)
raw | patch | inline | side by side (parent: 9e9b267)
author | Junio C Hamano <junkio@cox.net> | |
Sat, 14 Jan 2006 00:45:42 +0000 (16:45 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 15 Jan 2006 01:21:38 +0000 (17:21 -0800) |
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-merge-octopus.sh | patch | blob | history |
diff --git a/git-merge-octopus.sh b/git-merge-octopus.sh
index d1f9f3d2d046395cea94a85a5861fc353afb8ec4..eb74f96e81b4980f395944da46602e29555fc6db 100755 (executable)
--- a/git-merge-octopus.sh
+++ b/git-merge-octopus.sh
MRT=$(git-write-tree)
CNT=1 ;# counting our head
NON_FF_MERGE=0
+OCTOPUS_FAILURE=0
for SHA1 in $remotes
do
+ case "$OCTOPUS_FAILURE" in
+ 1)
+ # We allow only last one to have a hand-resolvable
+ # conflicts. Last round failed and we still had
+ # a head to merge.
+ echo "Automated merge did not work."
+ echo "Should not be doing an Octopus."
+ exit 2
+ esac
+
common=$(git-merge-base --all $MRC $SHA1) ||
die "Unable to find common commit with $SHA1"
if test $? -ne 0
then
echo "Simple merge did not work, trying automatic merge."
- git-merge-index -o git-merge-one-file -a || {
- echo "Not trivially merged."
- echo "Should not be doing an Octopus."
- exit 2
- }
+ git-merge-index -o git-merge-one-file -a ||
+ OCTOPUS_FAILURE=1
next=$(git-write-tree 2>/dev/null)
fi
MRT=$next
done
-exit 0
+exit "$OCTOPUS_FAILURE"