From 3a17a51aaf2eda07c4255b51ba1798ab34975c9f Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 22 Mar 2007 21:34:16 +0100 Subject: [PATCH] Set the default branch in run, not in the constructor --- git-p4 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git-p4 b/git-p4 index b21dee3..e6a34f4 100755 --- a/git-p4 +++ b/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: -- 2.11.4.GIT