]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
some dirty fix: we dont't need option -b when checking out master
authorMathias Klette <mathias.klette@profitbricks.com>
Fri, 7 Oct 2011 16:20:10 +0000 (18:20 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Fri, 7 Oct 2011 16:20:10 +0000 (18:20 +0200)
kernel_inpbuilder.py

index 87fcca179ce5197c3f7e56c0bb43966013385c17..583d3ff4f05ed7a8990fbee30404b9ed9bce2567 100644 (file)
@@ -165,7 +165,10 @@ def git_clone_remote_repository(url, destination):
     return True
 
 def git_checkout_branch():
-    cmd = [GIT, 'checkout', '-b', GIT_BRANCH_NAME, GIT_REMOTE_BRANCH_NAME]
+    if GIT_BRANCH_NAME == "master":
+        cmd = [GIT, 'checkout', GIT_REMOTE_BRANCH_NAME]
+    else:
+        cmd = [GIT, 'checkout', '-b', GIT_BRANCH_NAME, GIT_REMOTE_BRANCH_NAME]
 
     cmdobj = subprocess.Popen(
             cmd,