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>
# a checkout isn't needed if new branch points to the current head
if tree_id:
# a checkout isn't needed if new branch points to the current head
if tree_id:
if os.path.isfile(os.path.join(base_dir, 'MERGE_HEAD')):
os.remove(os.path.join(base_dir, 'MERGE_HEAD'))
if os.path.isfile(os.path.join(base_dir, 'MERGE_HEAD')):
os.remove(os.path.join(base_dir, 'MERGE_HEAD'))