Don't use "-b" option when change branch.
- We need to use "-b" option for "git checkout" command
only when going to create new branch. When we need just to change
branch we shouldn't use the option.
Change-Id: I519bf4f5f98c4c88dce08df1e2f762c467f6d4de
diff --git a/src/com/mirantis/mk/Git.groovy b/src/com/mirantis/mk/Git.groovy
index 65b80ab..9e3c460 100644
--- a/src/com/mirantis/mk/Git.groovy
+++ b/src/com/mirantis/mk/Git.groovy
@@ -56,7 +56,7 @@
def changeGitBranch(path, branch) {
dir(path) {
git_cmd = sh (
- script: "git checkout -b ${branch}",
+ script: "git checkout ${branch}",
returnStdout: true
).trim()
}