зеркало из https://github.com/microsoft/git.git
Use 'merge-base --all' where applicable.
It may get extra merge base on truly pathological commit histories, but is a lot easier to understand, explain, and prove correctness. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Родитель
a489352e3d
Коммит
13956670a7
|
@ -110,7 +110,14 @@ do
|
||||||
die "$remote - not something we can merge"
|
die "$remote - not something we can merge"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
case "$#" in
|
||||||
|
1)
|
||||||
|
common=$(git-merge-base --all $head "$@")
|
||||||
|
;;
|
||||||
|
*)
|
||||||
common=$(git-show-branch --merge-base $head "$@")
|
common=$(git-show-branch --merge-base $head "$@")
|
||||||
|
;;
|
||||||
|
esac
|
||||||
echo "$head" >"$GIT_DIR/ORIG_HEAD"
|
echo "$head" >"$GIT_DIR/ORIG_HEAD"
|
||||||
|
|
||||||
case "$#,$common,$no_commit" in
|
case "$#,$common,$no_commit" in
|
||||||
|
@ -162,7 +169,7 @@ case "$#,$common,$no_commit" in
|
||||||
up_to_date=t
|
up_to_date=t
|
||||||
for remote
|
for remote
|
||||||
do
|
do
|
||||||
common_one=$(git-merge-base $head $remote)
|
common_one=$(git-merge-base --all $head $remote)
|
||||||
if test "$common_one" != "$remote"
|
if test "$common_one" != "$remote"
|
||||||
then
|
then
|
||||||
up_to_date=f
|
up_to_date=f
|
||||||
|
|
Загрузка…
Ссылка в новой задаче