From 3d3dd029f83c5aa39e870bedbc7990a23267678b Mon Sep 17 00:00:00 2001 From: Paul Sherwood Date: Mon, 9 Dec 2013 22:00:53 +0000 Subject: improve git handling for merges --- all-update.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/all-update.sh b/all-update.sh index c6f5b49..4122bc8 100755 --- a/all-update.sh +++ b/all-update.sh @@ -54,17 +54,21 @@ repos=`for stratum in $strata; do for repo in $repos; do echo processing $repo cd $workspace/*:$repo - if [ `git tag | wc -l` != "0" ]; then + if [ `git tag | wc -l` != "0" ] && [ $repo != 'morphs' ]; then + echo `git tag | wc -l` tags - branch `git rev-parse --abbrev-ref HEAD` startpoint=`git rev-parse HEAD` - echo startpoint is $startpoint + branch=`git rev-parse --abbrev-ref HEAD` + branchpoint=`git merge-base $branch origin/master` + echo "startpoint is $startpoint, branchpoint is $branchpoint" tag=`git describe --tags $(git rev-list --tags --max-count=1)` echo "merging $tag in $repo" - foo=`git merge $tag 2>&1` - if [ $? != "0" ]; then - echo $foo - echo "need to reset $repo" - git reset --hard $startpoint - fi + git checkout $branchpoint + foo=`git merge --no-verify-signatures $tag 2>&1` + for commit in `git cherry origin/master $branch | sed 's/+ //` + do + echo "git cherry-pick $commit" + "git cherry-pick $commit" + done else echo "no tag found in $repo" fi -- cgit v1.2.1