Skip to content

Commit

Permalink
merge script: handle many-way octopus
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Aug 18, 2010
1 parent eeb70b6 commit d9a680a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contrib/examples/git-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ case "$#" in
common=$(git merge-base --all $head "$@")
;;
*)
common=$(git show-branch --merge-base $head "$@")
common=$(git merge-base --all --octopus $head "$@")
;;
esac
echo "$head" >"$GIT_DIR/ORIG_HEAD"
Expand Down Expand Up @@ -528,9 +528,9 @@ if test '' != "$result_tree"
then
if test "$allow_fast_forward" = "t"
then
parents=$(git show-branch --independent "$head" "$@")
parents=$(git merge-base --independent "$head" "$@")
else
parents=$(git rev-parse "$head" "$@")
parents=$(git rev-parse "$head" "$@")
fi
parents=$(echo "$parents" | sed -e 's/^/-p /')
result_commit=$(printf '%s\n' "$merge_msg" | git commit-tree $result_tree $parents) || exit
Expand Down

0 comments on commit d9a680a

Please sign in to comment.