X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=contrib%2Ffast-import%2Fgit-p4;h=2216cacba79ad7171b7b5abbd1ff27e7b1ef84a1;hb=34a5d35bbd6164cfbe08f5f14e359867ce80955b;hp=c1d24b38f32463b0335cf54071a89a41952ff086;hpb=5a1e8707a6d9c7016a59d9987c1bc72ffe1252c8;p=git.git diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index c1d24b38f..2216cacba 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -1748,8 +1748,12 @@ class P4Clone(P4Sync): if not P4Sync.run(self, depotPaths): return False if self.branch != "master": - if gitBranchExists("refs/remotes/p4/master"): - system("git branch master refs/remotes/p4/master") + if self.importIntoRemotes: + masterbranch = "refs/remotes/p4/master" + else: + masterbranch = "refs/heads/p4/master" + if gitBranchExists(masterbranch): + system("git branch master %s" % masterbranch) system("git checkout -f") else: print "Could not detect main branch. No checkout/master branch created."