When using the GitFlow workflow, the most significant branch (for development team) is the develop branch, not master.
It would be necessary to offer a way to configure the Git plugin to focus on an other branch than master.
Proposal:
- In each Git repository settings, in "General settings", there is a drop down to select the default branch (default being current, aka
master
)
- Only an existing branch can be selected at this point
- The selection is not proposed when there are no branches in the repo yet
- Default branch should be updated in git repo with
git symbolic-ref HEAD refs/heads/...
- ⚠️ The info is not duplicated in the database
- Tuleap will then refuse to delete default branch
- Need to deploy pre-receive hook to prevent modification (update of project like permission should be redeploy hooks, to be checked). As the redeploy is costly, we won't force redeploy everywhere so new hooks will be pushed:
- For all new repositories
- When a new default branch is set (send the project conf dump event)
- When permissions are update
- The default branch info should be added in REST
/git/:id
representation
- When repository is displayed without a selected branch, the new default is used.
- The branch selector displays a
default
label next to the default branch