From 169149117e17294e4f248fca381d5affcfc8d11c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 17 May 2007 21:18:53 +0200 Subject: [PATCH] Bite the bullet and automatically convert old style refs/heads/p4 repositories to the new style refs/remotes/p4 branching. --- git-p4 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/git-p4 b/git-p4 index 3cc6481..cb9961a 100755 --- a/git-p4 +++ b/git-p4 @@ -832,10 +832,12 @@ class P4Sync(Command): defaultImport = False if len(self.branch) == 0: + self.branch = "refs/remotes/p4/master" if gitBranchExists("refs/heads/p4"): - self.branch = "p4" + system("git update-ref %s refs/heads/p4" % self.branch) + system("git symbolic-ref refs/remotes/p4/HEAD refs/remotes/p4/master") + system("git branch -D p4"); else: - self.branch = "refs/remotes/p4/master" defaultImport = True if len(args) == 0: -- 2.11.4.GIT