X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-merge-octopus.sh;h=1dadbb49666c6d796df76babbfd291a2de4357e4;hb=99b52f2e495a2ccdb4ebf2a540a8bc81fa2bcf3d;hp=645e1147dc886f2b1ca6d2020b44db746b082bf0;hpb=547905f8cd2a04b3e1117f00025b60f81aa60f47;p=git.git diff --git a/git-merge-octopus.sh b/git-merge-octopus.sh index 645e1147d..1dadbb496 100755 --- a/git-merge-octopus.sh +++ b/git-merge-octopus.sh @@ -61,7 +61,7 @@ do exit 2 esac - common=$(git merge-base --all $MRC $SHA1) || + common=$(git merge-base --all $SHA1 $MRC) || die "Unable to find common commit with $SHA1" case "$LF$common$LF" in @@ -100,14 +100,7 @@ do next=$(git write-tree 2>/dev/null) fi - # We have merged the other branch successfully. Ideally - # we could implement OR'ed heads in merge-base, and keep - # a list of commits we have merged so far in MRC to feed - # them to merge-base, but we approximate it by keep using - # the current MRC. We used to update it to $common, which - # was incorrectly doing AND'ed merge-base here, which was - # unneeded. - + MRC="$MRC $SHA1" MRT=$next done