summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2020-11-08 08:41:51 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-11-09 13:01:47 -0800
commit1b09d1917f376d52e191102509d08303f8d26388 (patch)
treec55aa637b9408c68ef6a6e087f07dc61ff36421f
parentGit 2.29.2 (diff)
downloadtgif-1b09d1917f376d52e191102509d08303f8d26388.tar.xz
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 <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgit-p4.py2
1 files changed, 1 insertions, 1 deletions
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: