From f6f82ff0bb7024a6d0348c0b2579e799d9908fad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 4 Jan 2012 19:34:03 +0000 Subject: [PATCH] update-common: add support for branches --- update-common | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/update-common b/update-common index 0d56dcd..6bafa37 100755 --- a/update-common +++ b/update-common @@ -15,6 +15,7 @@ # Set this variable to point to any directory containing existing # git # checkouts, and git will pull objects from there, decreasing # network usage. +BRANCH=0.10 reference=~/gst set -e @@ -38,11 +39,18 @@ do git clone ssh://git.freedesktop.org/git/gstreamer/$module fi cd $dir/$module + + # ignore modules that don't have such a branch + if ! git show-ref origin/$BRANCH >/dev/null; then + continue; + fi + + git checkout -b $BRANCH origin/$BRANCH git submodule init git submodule update cd $dir/$module/common ref_from=`git log --pretty=format:%h -n 1 HEAD` - git checkout master + git checkout -b $BRANCH origin/$BRANCH git pull origin ref_to=`git log --pretty=format:%h -n 1 HEAD` echo updating common from $ref_from to $ref_to @@ -59,7 +67,9 @@ done for module in $modules do cd $dir/$module - git push origin + if git show-ref origin/$BRANCH >/dev/null; then + git push origin $BRANCH + fi done rm -rf $dir -- 2.7.4