summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sherwood <paul.sherwood@codethink.co.uk>2013-12-09 22:00:53 +0000
committerPaul Sherwood <paul.sherwood@codethink.co.uk>2013-12-09 22:34:48 +0000
commit3d3dd029f83c5aa39e870bedbc7990a23267678b (patch)
tree25cb85fbde5397fe55f808e32f20d22b2fcb30fb
parent7e6d33388bac4ff13e8c61475809209515141a7a (diff)
downloadmorphs-3d3dd029f83c5aa39e870bedbc7990a23267678b.tar.gz
improve git handling for merges
-rwxr-xr-xall-update.sh20
1 files 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