Minor bug fixed in git_functions: the branch origin/HEAD should not be created 69/869/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 4 Jan 2017 13:28:04 +0000 (14:28 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 4 Jan 2017 13:28:04 +0000 (14:28 +0100)
Change-Id: I66cad44a67329ecf4543cdd2283a1294a0e496d6
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
jenkins/common/git_functions

index 7856623..afd0962 100644 (file)
@@ -2,8 +2,7 @@
 
 
 GIT() {
-
-       CMD git "$@"
+    CMD git "$@"
 }
 
 
@@ -20,7 +19,7 @@ OSM_git_checkout() {
         INFO "cloning MDG $OSM_MDG from $OSM_GIT_URL/$OSM_MDG"
         GIT clone $OSM_GIT_URL/$OSM_MDG
         cd $OSM_MDG
-        for remote in `git branch -r`; do GIT branch --track ${remote#origin/} $remote; done
+        for remote in `git branch -r |grep -v /HEAD`; do GIT branch --track ${remote#origin/} $remote; done
     fi
     
     if [ $# -gt 0 ]; then
@@ -38,3 +37,4 @@ OSM_git_checkout() {
     fi
 
 }
+