summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-11-08 08:41:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-09 21:01:47 (GMT)
commit1b09d1917f376d52e191102509d08303f8d26388 (patch)
treec55aa637b9408c68ef6a6e087f07dc61ff36421f /git-p4.py
parent898f80736c75878acc02dc55672317fcc0e0a5a6 (diff)
downloadgit-1b09d1917f376d52e191102509d08303f8d26388.zip
git-1b09d1917f376d52e191102509d08303f8d26388.tar.gz
git-1b09d1917f376d52e191102509d08303f8d26388.tar.bz2
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>
Diffstat (limited to 'git-p4.py')
-rwxr-xr-xgit-p4.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-p4.py b/git-p4.py
index 4433ca5..52ddb1d 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: