From: Mathias Klette Date: Fri, 7 Oct 2011 16:20:10 +0000 (+0200) Subject: some dirty fix: we dont't need option -b when checking out master X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=1798f70826b446ec157fed8069ddddbc9b492245;p=profitbricks%2Fjenkins-build-scripts.git some dirty fix: we dont't need option -b when checking out master --- diff --git a/kernel_inpbuilder.py b/kernel_inpbuilder.py index 87fcca1..583d3ff 100644 --- a/kernel_inpbuilder.py +++ b/kernel_inpbuilder.py @@ -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,