1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-21 17:26:09 +02:00

Make git-p4 work with packed refs (don't use os.path.exists to check for the

existance of a ref)

Signed-off-by: Simon Hausmann <simon@lst.de>
This commit is contained in:
Simon Hausmann 2007-05-25 08:49:18 +02:00
parent 65c5f3e3f2
commit 4280e53333

View File

@ -412,7 +412,7 @@ class P4Submit(Command):
if len(args) == 0:
self.master = currentGitBranch()
if len(self.master) == 0 or not os.path.exists("%s/refs/heads/%s" % (gitdir, self.master)):
if len(self.master) == 0 or not gitBranchExists("refs/heads/%s" % self.master):
die("Detecting current git branch failed!")
elif len(args) == 1:
self.master = args[0]
@ -812,7 +812,7 @@ class P4Sync(Command):
continue
update = False
if not os.path.exists(gitdir + "/" + remoteHead):
if not gitBranchExists(remoteHead):
if self.verbose:
print "creating %s" % remoteHead
update = True