summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
Diffstat (limited to 'project.py')
-rw-r--r--project.py18
1 files changed, 5 insertions, 13 deletions
diff --git a/project.py b/project.py
index a5d35bf3..2112ee32 100644
--- a/project.py
+++ b/project.py
@@ -1994,19 +1994,11 @@ class Project(object):
1994 except KeyError: 1994 except KeyError:
1995 head = None 1995 head = None
1996 if revid and head and revid == head: 1996 if revid and head and revid == head:
1997 if self.use_git_worktrees: 1997 ref = R_HEADS + name
1998 self.work_git.update_ref(HEAD, revid) 1998 self.work_git.update_ref(ref, revid)
1999 branch.Save() 1999 self.work_git.symbolic_ref(HEAD, ref)
2000 else: 2000 branch.Save()
2001 ref = os.path.join(self.gitdir, R_HEADS + name) 2001 return True
2002 try:
2003 os.makedirs(os.path.dirname(ref))
2004 except OSError:
2005 pass
2006 _lwrite(ref, '%s\n' % revid)
2007 _lwrite(self.GetHeadPath(), 'ref: %s%s\n' % (R_HEADS, name))
2008 branch.Save()
2009 return True
2010 2002
2011 if GitCommand(self, 2003 if GitCommand(self,
2012 ['checkout', '-b', branch.name, revid], 2004 ['checkout', '-b', branch.name, revid],