Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Use 'merge-base --all' where applicable.
author
Junio C Hamano
<junkio@cox.net>
Thu, 10 Nov 2005 02:54:14 +0000
(18:54 -0800)
committer
Junio C Hamano
<junkio@cox.net>
Thu, 10 Nov 2005 02:54:14 +0000
(18:54 -0800)
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>
git-merge.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
a489352
)
diff --git
a/git-merge.sh
b/git-merge.sh
index b810fceaf8787f6c450abc628d0a329fe298b13f..7f481e4caacf295635f1fb69c9b4f1c364355234 100755
(executable)
--- a/
git-merge.sh
+++ b/
git-merge.sh
@@
-110,7
+110,14
@@
do
die "$remote - not something we can merge"
done
die "$remote - not something we can merge"
done
-common=$(git-show-branch --merge-base $head "$@")
+case "$#" in
+1)
+ common=$(git-merge-base --all $head "$@")
+ ;;
+*)
+ common=$(git-show-branch --merge-base $head "$@")
+ ;;
+esac
echo "$head" >"$GIT_DIR/ORIG_HEAD"
case "$#,$common,$no_commit" in
echo "$head" >"$GIT_DIR/ORIG_HEAD"
case "$#,$common,$no_commit" in
@@
-162,7
+169,7
@@
case "$#,$common,$no_commit" in
up_to_date=t
for remote
do
up_to_date=t
for remote
do
- common_one=$(git-merge-base $head $remote)
+ common_one=$(git-merge-base
--all
$head $remote)
if test "$common_one" != "$remote"
then
up_to_date=f
if test "$common_one" != "$remote"
then
up_to_date=f