Improve default branch option support for Project API
Follow-up for #26261 (closed)
!63771 (merged) adds basic support for default_branch
parameter. It currently has a limitation, that repository must be initialized in order to apply the requested branch name.
Based on the suggestion we can define the initial branch even for the empty repository.
But gitaly does not support this option yet.
Proposal
- Extend
CreateRepository
request with a new optiondefault_branch
and apply its value as a flag to git init command (--initial-branch=<default_branch>
) - gitaly!3582 (closed) - Update gitaly client to support
default_branch
and allow to usedefault_branch
option separately frominitialize_from_readme