merge script: handle many-way octopus

Based on v1.6.0-rc0~51^2~5 (Build in merge, 2008-07-07).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jonathan Nieder 2010-08-17 02:09:58 -05:00 коммит произвёл Junio C Hamano
Родитель eeb70b6769
Коммит d9a680acf6
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -374,7 +374,7 @@ case "$#" in
common=$(git merge-base --all $head "$@") common=$(git merge-base --all $head "$@")
;; ;;
*) *)
common=$(git show-branch --merge-base $head "$@") common=$(git merge-base --all --octopus $head "$@")
;; ;;
esac esac
echo "$head" >"$GIT_DIR/ORIG_HEAD" echo "$head" >"$GIT_DIR/ORIG_HEAD"
@ -528,9 +528,9 @@ if test '' != "$result_tree"
then then
if test "$allow_fast_forward" = "t" if test "$allow_fast_forward" = "t"
then then
parents=$(git show-branch --independent "$head" "$@") parents=$(git merge-base --independent "$head" "$@")
else else
parents=$(git rev-parse "$head" "$@") parents=$(git rev-parse "$head" "$@")
fi fi
parents=$(echo "$parents" | sed -e 's/^/-p /') parents=$(echo "$parents" | sed -e 's/^/-p /')
result_commit=$(printf '%s\n' "$merge_msg" | git commit-tree $result_tree $parents) || exit result_commit=$(printf '%s\n' "$merge_msg" | git commit-tree $result_tree $parents) || exit