diff options
author | Simon Hausmann <simon@lst.de> | 2007-03-22 21:34:16 +0100 |
---|---|---|
committer | Simon Hausmann <simon@lst.de> | 2007-03-22 21:34:16 +0100 |
commit | 569d1bd4092aacd44a826852e087d0f0e9928ce8 (patch) | |
tree | ae354cca01a05b61107176c2b574013122de92e8 | |
parent | 8136a6399c886dec8d1b806a7d8728324e906729 (diff) | |
download | git-569d1bd4092aacd44a826852e087d0f0e9928ce8.tar.gz git-569d1bd4092aacd44a826852e087d0f0e9928ce8.tar.xz |
Set the default branch in run, not in the constructor
Signed-off-by: Simon Hausmann <simon@lst.de>
-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 b21dee319..e6a34f4f4 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -379,7 +379,7 @@ class GitSync(Command): self.knownBranches = Set() self.createdBranches = Set() self.committedChanges = Set() - self.branch = "p4" + self.branch = "" self.detectBranches = False self.changesFile = "" @@ -706,6 +706,9 @@ class GitSync(Command): self.users[output["User"]] = output["FullName"] + " <" + output["Email"] + ">" def run(self, args): + if len(self.branch) == 0: + self.branch = "p4" + self.branch = "refs/heads/" + self.branch self.globalPrefix = self.previousDepotPath = os.popen("git-repo-config --get p4.depotpath").read() if len(self.globalPrefix) != 0: |