@matheusbsbs / matheus-bagliano / commits / 569d1bd409
Fork 0

Set the default branch in run, not in the constructor

Signed-off-by: Simon Hausmann <simon@lst.de>

Simon Hausmann committed Mar 22, 2007 at 21:34 UTC 569d1bd4092aacd44a826852e087d0f0e9928ce8
1 file changed +4 -1
contrib/fast-import/git-p4
+4 -1
@@ -379,7 +379,7 @@ class GitSync(Command):
379 self.knownBranches = Set()
380 self.createdBranches = Set()
381 self.committedChanges = Set()
382 - self.branch = "p4"
382 + self.branch = ""
383 self.detectBranches = False
384 self.changesFile = ""
385
@@ -706,6 +706,9 @@ class GitSync(Command):
706 self.users[output["User"]] = output["FullName"] + " <" + output["Email"] + ">"
707
708 def run(self, args):
709 + if len(self.branch) == 0:
710 + self.branch = "p4"
711 +
712 self.branch = "refs/heads/" + self.branch
713 self.globalPrefix = self.previousDepotPath = os.popen("git-repo-config --get p4.depotpath").read()
714 if len(self.globalPrefix) != 0: