uwolfer / gerrit-intellij-plugin

Gerrit Code Review Tool Integration for the IntelliJ Platform
Apache License 2.0
495 stars 103 forks source link

Add force branch name settings #519

Open Al3xCalibur opened 3 months ago

Al3xCalibur commented 3 months ago

One main idea of Gerrit's flow is to push on master, with custom git behaviours. Thus on remote, it is very exceptional to work on another branch. But locally, it still makes sense to use branches and to push on master. Especially allows for a nice presentation on Gerrit with the "pushed together commits"

That's why it makes sense for the plugin to force the main branch based on the gitreview file. But it only covers the case of a single local repo/gerritPushTargetPanel. For multiple ones, we must type "master" in the branch input each time we push using a local branch. It happens very often in my case.

Given I'm not sure everyone wants that behaviour (and I tried to understand the codebase), I've added a specific setting