@matheusbsbs / matheus-bagliano / commits / 4280e53333
Fork 0

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

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>

Simon Hausmann committed May 25, 2007 at 08:49 UTC 4280e5333354c6dddcd994bdacd3c6a11ac2da5e
1 file changed +2 -2
contrib/fast-import/git-p4
+2 -2
@@ -412,7 +412,7 @@ class P4Submit(Command):
412
413 if len(args) == 0:
414 self.master = currentGitBranch()
415 - if len(self.master) == 0 or not os.path.exists("%s/refs/heads/%s" % (gitdir, self.master)):
415 + if len(self.master) == 0 or not gitBranchExists("refs/heads/%s" % self.master):
416 die("Detecting current git branch failed!")
417 elif len(args) == 1:
418 self.master = args[0]
@@ -812,7 +812,7 @@ class P4Sync(Command):
812 continue
813
814 update = False
815 - if not os.path.exists(gitdir + "/" + remoteHead):
815 + if not gitBranchExists(remoteHead):
816 if self.verbose:
817 print "creating %s" % remoteHead
818 update = True