chiark / gitweb /
[PATCH] Fix a couple of bugs in "stg branch --create"
authorChuck Lever <cel@netapp.com>
Thu, 6 Oct 2005 20:58:01 +0000 (21:58 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Thu, 6 Oct 2005 20:58:01 +0000 (21:58 +0100)
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 <cel@netapp.com>
stgit/git.py

index 55f06c119843927ef00288c34ec43ad5ec352508..241f375940b7f03ceeda07c65fcb6bd7b4e15714 100644 (file)
@@ -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'))