mirror of
https://github.com/git/git
synced 2024-09-13 05:14:36 +00:00
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>
This commit is contained in:
parent
898f80736c
commit
1b09d1917f
|
@ -4186,7 +4186,7 @@ def run(self, args):
|
||||||
|
|
||||||
# create a master branch and check out a work tree
|
# create a master branch and check out a work tree
|
||||||
if gitBranchExists(self.branch):
|
if gitBranchExists(self.branch):
|
||||||
system([ "git", "branch", "master", self.branch ])
|
system([ "git", "branch", currentGitBranch(), self.branch ])
|
||||||
if not self.cloneBare:
|
if not self.cloneBare:
|
||||||
system([ "git", "checkout", "-f" ])
|
system([ "git", "checkout", "-f" ])
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue