From: Chuck Lever Date: Wed, 26 Oct 2005 18:51:38 +0000 (-0400) Subject: Make sure switch_branch uses the right __head X-Git-Tag: v0.8~53 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/98d6e2c5e849d1a64ab3062aaeed5dd53fbba22e Make sure switch_branch uses the right __head "switch_branch" needs to use the global variable __head, not a local version. Signed-off-by: Chuck Lever --- diff --git a/stgit/git.py b/stgit/git.py index 58a4841..33702cb 100644 --- a/stgit/git.py +++ b/stgit/git.py @@ -296,6 +296,8 @@ def create_branch(new_branch, tree_id = None): def switch_branch(name): """Switch to a git branch """ + global __head + new_head = os.path.join('refs', 'heads', name) if not branch_exists(new_head): raise GitException, 'Branch "%s" does not exist' % name