From: Simon Hausmann Date: Thu, 17 May 2007 19:18:53 +0000 (+0200) Subject: Bite the bullet and automatically convert old style refs/heads/p4 repositories X-Git-Tag: v1.5.3-rc0~65^2^2~102 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=48df6fd850b2d9dc52a8a89a9e6deecd2cf1d351;p=git.git 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 --- diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 3cc648137..cb9961a57 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/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: