From 1b09d1917f376d52e191102509d08303f8d26388 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 8 Nov 2020 08:41:51 +0000 Subject: [PATCH] p4: respect init.defaultBranch In `git p4 clone`, we hard-code the branch name `master` instead of looking what the _actual_ initial branch name is. Let's fix that. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- git-p4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-p4.py b/git-p4.py index 4433ca53de..52ddb1d7b2 100755 --- a/git-p4.py +++ b/git-p4.py @@ -4186,7 +4186,7 @@ class P4Clone(P4Sync): # create a master branch and check out a work tree if gitBranchExists(self.branch): - system([ "git", "branch", "master", self.branch ]) + system([ "git", "branch", currentGitBranch(), self.branch ]) if not self.cloneBare: system([ "git", "checkout", "-f" ]) else: -- 2.11.4.GIT