@matheusbsbs / matheus-bagliano / commits / d9a680acf6
Fork 0

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>

Jonathan Nieder committed Aug 17, 2010 at 02:09 UTC d9a680acf68caef16b5f316ed7917d8160d3578a
1 file changed +3 -3
contrib/examples/git-merge.sh
+3 -3
@@ -374,7 +374,7 @@ case "$#" in
374 common=$(git merge-base --all $head "$@")
375 ;;
376 *)
377 - common=$(git show-branch --merge-base $head "$@")
377 + common=$(git merge-base --all --octopus $head "$@")
378 ;;
379 esac
380 echo "$head" >"$GIT_DIR/ORIG_HEAD"
@@ -528,9 +528,9 @@ if test '' != "$result_tree"
528 then
529 if test "$allow_fast_forward" = "t"
530 then
531 - parents=$(git show-branch --independent "$head" "$@")
531 + parents=$(git merge-base --independent "$head" "$@")
532 else
533 - parents=$(git rev-parse "$head" "$@")
533 + parents=$(git rev-parse "$head" "$@")
534 fi
535 parents=$(echo "$parents" | sed -e 's/^/-p /')
536 result_commit=$(printf '%s\n' "$merge_msg" | git commit-tree $result_tree $parents) || exit