From: garciadeblas Date: Wed, 4 Jan 2017 13:28:04 +0000 (+0100) Subject: Minor bug fixed in git_functions: the branch origin/HEAD should not be created X-Git-Tag: v1.0.4~2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=e460692a8194bba33a76164c6d0def8bfc3e4745;hp=14640f05886826be6f647b34963d046dcd39140f;p=osm%2Fdevops.git Minor bug fixed in git_functions: the branch origin/HEAD should not be created Change-Id: I66cad44a67329ecf4543cdd2283a1294a0e496d6 Signed-off-by: garciadeblas --- diff --git a/jenkins/common/git_functions b/jenkins/common/git_functions index 7856623b..afd0962b 100644 --- a/jenkins/common/git_functions +++ b/jenkins/common/git_functions @@ -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 } +