summaryrefslogtreecommitdiff
path: root/contrib/fast-import
diff options
context:
space:
mode:
authorSimon Hausmann <simon@lst.de>2007-05-17 21:18:53 +0200
committerSimon Hausmann <simon@lst.de>2007-05-17 21:18:53 +0200
commit48df6fd850b2d9dc52a8a89a9e6deecd2cf1d351 (patch)
tree5a1714a5b1afa15a3fddf7042c7cbb47ae43c2f8 /contrib/fast-import
parentc6d44cb1a1a9bca58d91ef414b9dbaa393d2de3a (diff)
downloadgit-48df6fd850b2d9dc52a8a89a9e6deecd2cf1d351.tar.gz
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>
Diffstat (limited to 'contrib/fast-import')
-rwxr-xr-xcontrib/fast-import/git-p46
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 3cc6481378..cb9961a571 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: