diff options
author | Simon Hausmann <simon@lst.de> | 2007-05-17 20:26:58 +0200 |
---|---|---|
committer | Simon Hausmann <simon@lst.de> | 2007-05-17 20:26:58 +0200 |
commit | 8ead4fda3fbaba93aae46931285e9613a058c08b (patch) | |
tree | 741a7c6adcd11dc9ebf56adf6887f772f0dea9fa /contrib/fast-import/git-p4 | |
parent | Removed ancient and unused code to find the last imported revision from previ... (diff) | |
download | tgif-8ead4fda3fbaba93aae46931285e9613a058c08b.tar.xz |
Create the origin based import branch using git update-ref instead of git branch
so that it's possible to have the import branch in refs/remotes.
Signed-off-by: Simon Hausmann <simon@lst.de>
Diffstat (limited to 'contrib/fast-import/git-p4')
-rwxr-xr-x | contrib/fast-import/git-p4 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index a19ba47481..4cd486eb3a 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -836,7 +836,10 @@ class P4Sync(Command): if not gitBranchExists(self.branch) and gitBranchExists("origin"): if not self.silent: print "Creating %s branch in git repository based on origin" % self.branch - system("git branch %s origin" % self.branch) + branch = self.branch + if not branch.startswith("refs"): + branch = "refs/heads/" + branch + system("git update-ref %s origin" % branch) [self.previousDepotPath, p4Change] = extractDepotPathAndChangeFromGitLog(extractLogMessageFromGitCommit(self.branch)) if len(self.previousDepotPath) > 0 and len(p4Change) > 0: |