From: Chuck Lever Date: Thu, 6 Oct 2005 20:58:01 +0000 (+0100) Subject: [PATCH] Fix a couple of bugs in "stg branch --create" X-Git-Tag: v0.14.3~620 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/2bc93640bae6adb563cd8b223af127c355bdd3a9?hp=c1fe1f9953a874eef1f4e975af0430766176e3f2 [PATCH] Fix a couple of bugs in "stg branch --create" Use "switch()" instead of "git.switch()". Also, __set_head is a little more complicated now, so a __clear_head_cache() is needed before we call it. Signed-off-by: Chuck Lever --- diff --git a/stgit/git.py b/stgit/git.py index 55f06c1..241f375 100644 --- a/stgit/git.py +++ b/stgit/git.py @@ -285,7 +285,7 @@ def create_branch(new_branch, tree_id = None): # a checkout isn't needed if new branch points to the current head if tree_id: - git.switch(tree_id) + switch(tree_id) if os.path.isfile(os.path.join(base_dir, 'MERGE_HEAD')): os.remove(os.path.join(base_dir, 'MERGE_HEAD'))