diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-01-07 15:40:21 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-07 15:40:21 -0800 |
commit | 3259ada4c79eb1e8213ab44c7ce3ec6f7775cd33 (patch) | |
tree | 4e39d2295155392349986d5ae49fa6506e960560 /git-merge-octopus.sh | |
parent | 0ad6f1a988312ebc2733126cf17f694d7008659f (diff) | |
parent | f08aa017675bffe2359e0122cff2e447486b97c1 (diff) | |
download | git-3259ada4c79eb1e8213ab44c7ce3ec6f7775cd33.tar.gz git-3259ada4c79eb1e8213ab44c7ce3ec6f7775cd33.tar.xz |
Merge branch 'sb/maint-octopus'
* sb/maint-octopus:
octopus: remove dead code
octopus: reenable fast-forward merges
octopus: make merge process simpler to follow
Conflicts:
git-merge-octopus.sh
Diffstat (limited to 'git-merge-octopus.sh')
-rwxr-xr-x | git-merge-octopus.sh | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/git-merge-octopus.sh b/git-merge-octopus.sh index 825c52c24..615753c83 100755 --- a/git-merge-octopus.sh +++ b/git-merge-octopus.sh @@ -44,9 +44,8 @@ esac # MRC is the current "merge reference commit" # MRT is the current "merge result tree" -MRC=$head MSG= PARENT="-p $head" +MRC=$(git rev-parse --verify -q $head) MRT=$(git write-tree) -CNT=1 ;# counting our head NON_FF_MERGE=0 OCTOPUS_FAILURE=0 for SHA1 in $remotes @@ -61,19 +60,17 @@ do exit 2 esac + eval pretty_name=\${GITHEAD_$SHA1:-$SHA1} common=$(git merge-base --all $SHA1 $MRC) || - die "Unable to find common commit with $SHA1" + die "Unable to find common commit with $pretty_name" case "$LF$common$LF" in *"$LF$SHA1$LF"*) - echo "Already up-to-date with $SHA1" + echo "Already up-to-date with $pretty_name" continue ;; esac - CNT=`expr $CNT + 1` - PARENT="$PARENT -p $SHA1" - if test "$common,$NON_FF_MERGE" = "$MRC,0" then # The first head being merged was a fast-forward. @@ -81,7 +78,7 @@ do # tree as the intermediate result of the merge. # We still need to count this as part of the parent set. - echo "Fast-forwarding to: $SHA1" + echo "Fast-forwarding to: $pretty_name" git read-tree -u -m $head $SHA1 || exit MRC=$SHA1 MRT=$(git write-tree) continue @@ -89,7 +86,7 @@ do NON_FF_MERGE=1 - echo "Trying simple merge with $SHA1" + echo "Trying simple merge with $pretty_name" git read-tree -u -m --aggressive $common $MRT $SHA1 || exit 2 next=$(git write-tree 2>/dev/null) if test $? -ne 0 |