only update submodule when it is not on a specific branch
authorThomas Vander Stichele <thomas (at) apestaart (dot) org>
Tue, 2 Jun 2009 23:01:57 +0000 (01:01 +0200)
committerThomas Vander Stichele <thomas (at) apestaart (dot) org>
Tue, 2 Jun 2009 23:02:43 +0000 (01:02 +0200)
autogen.sh

index 266a808..27a3ca2 100755 (executable)
@@ -11,7 +11,20 @@ then
   echo "+ Setting up common submodule"
   git submodule init
 fi
-git submodule update
+
+# only update if the submodule is tracking master at some version,
+# which means there is no branch name
+cd common
+branch=`git branch | grep ^* | cut -c 3-`
+cd ..
+
+if test "x$branch" == "x(no branch)"
+then
+  echo "+ Updating common submodule"
+  git submodule update common
+else
+  echo "+ Not updating common submodule on branch $branch"
+fi
 
 # source helper functions
 if test ! -f common/gst-autogen.sh;