Commit 328951ef by Stephen Fromm

Checkout branch before rebase in switch_version

parent ccc04cf8
......@@ -182,6 +182,10 @@ def switch_version(module, dest, remote, version):
cmd = "git checkout --force %s" % version
else:
# is there a better way to do this?
branch = get_head_branch(module, dest, remote)
(rc, out, err) = _run("git checkout --force %s" % branch)
if rc != 0:
module.fail_json(msg="Failed to checkout branch %s" % branch)
cmd = "git rebase %s" % remote
return _run(cmd)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment