"switch_branch" needs to use the global variable __head, not a local
version.
Signed-off-by: Chuck Lever <cel@netapp.com>
def switch_branch(name):
"""Switch to a git branch
"""
def switch_branch(name):
"""Switch to a git branch
"""
new_head = os.path.join('refs', 'heads', name)
if not branch_exists(new_head):
raise GitException, 'Branch "%s" does not exist' % name
new_head = os.path.join('refs', 'heads', name)
if not branch_exists(new_head):
raise GitException, 'Branch "%s" does not exist' % name