Merge branch 'master' into 0.11
authorThomas Vander Stichele <thomas (at) apestaart (dot) org>
Wed, 25 Jan 2012 13:26:17 +0000 (14:26 +0100)
committerThomas Vander Stichele <thomas (at) apestaart (dot) org>
Wed, 25 Jan 2012 13:26:17 +0000 (14:26 +0100)
1  2 
update-common

diff --cc update-common
@@@ -15,8 -15,8 +15,9 @@@
  # Set this variable to point to any directory containing existing
  # git # checkouts, and git will pull objects from there, decreasing
  # network usage.
 +BRANCH=0.11
  reference=~/gst
+ PUSHURL=ssh://git.freedesktop.org/git/gstreamer
  
  set -e
  set -x
@@@ -32,20 -32,19 +33,26 @@@ for module in $module
  do
    cd $dir
    if test -e $reference/$module/.git ; then
+     pushd $reference/$module
+     PUSHURL=`git config remote.origin.url | sed 's@\(git/gstreamer\).*@\1@'`
+     popd
      git clone --reference $reference/$module/.git --shared ssh://git.freedesktop.org/git/gstreamer/$module
    elif test -e $topdir/$module/.git ; then
-     git clone --reference $topdir/$module/.git --shared ssh://git.freedesktop.org/git/gstreamer/$module
+     pushd $topdir/$module
+     PUSHURL=`git config remote.origin.url | sed 's@\(git/gstreamer\).*@\1@'`
+     popd
+     git clone --reference $topdir/$module/.git --shared $PUSHURL/$module
    else
-     git clone ssh://git.freedesktop.org/git/gstreamer/$module
+     git clone $PUSHURL/$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