[0.11] common: update-common: read the url to push to from config

Thomas Vander Stichele thomasvs at kemper.freedesktop.org
Wed Jan 25 05:26:35 PST 2012


Module: common
Branch: 0.11
Commit: d4f33651dc6ded8aba160182749a1ea1797775d2
URL:    http://cgit.freedesktop.org/gstreamer/common/commit/?id=d4f33651dc6ded8aba160182749a1ea1797775d2

Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Wed Jan 25 14:20:52 2012 +0100

update-common: read the url to push to from config

---

 update-common |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/update-common b/update-common
index 0d56dcd..3482c1f 100755
--- a/update-common
+++ b/update-common
@@ -16,6 +16,7 @@
 # git # checkouts, and git will pull objects from there, decreasing
 # network usage.
 reference=~/gst
+PUSHURL=ssh://git.freedesktop.org/git/gstreamer
 
 set -e
 set -x
@@ -31,11 +32,17 @@ for module in $modules
 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
   git submodule init



More information about the gstreamer-commits mailing list