Skip to content

Commit 1b09d19

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 898f807 commit 1b09d19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-p4.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4186,7 +4186,7 @@ def run(self, args):
41864186

41874187
# create a master branch and check out a work tree
41884188
if gitBranchExists(self.branch):
4189-
system([ "git", "branch", "master", self.branch ])
4189+
system([ "git", "branch", currentGitBranch(), self.branch ])
41904190
if not self.cloneBare:
41914191
system([ "git", "checkout", "-f" ])
41924192
else:

0 commit comments

Comments
 (0)