@matheusbsbs / matheus-bagliano / commits / 48df6fd850
Fork 0

Bite the bullet and automatically convert old style refs/heads/p4 repositories to the new style refs/remotes/p4 branching.

Bite the bullet and automatically convert old style refs/heads/p4 repositories to the new style refs/remotes/p4 branching. Signed-off-by: Simon Hausmann <simon@lst.de>

Simon Hausmann committed May 17, 2007 at 21:18 UTC 48df6fd850b2d9dc52a8a89a9e6deecd2cf1d351
1 file changed +4 -2
contrib/fast-import/git-p4
+4 -2
@@ -832,10 +832,12 @@ class P4Sync(Command):
832 defaultImport = False
833
834 if len(self.branch) == 0:
835 + self.branch = "refs/remotes/p4/master"
836 if gitBranchExists("refs/heads/p4"):
836 - self.branch = "p4"
837 + system("git update-ref %s refs/heads/p4" % self.branch)
838 + system("git symbolic-ref refs/remotes/p4/HEAD refs/remotes/p4/master")
839 + system("git branch -D p4");
840 else:
838 - self.branch = "refs/remotes/p4/master"
841 defaultImport = True
842
843 if len(args) == 0: