[sane-devel] Proposal to disallow direct pushes to the master branch

Povilas Kanapickas povilas at radix.lt
Sat Oct 12 00:25:41 BST 2019


Hi,

Currently there are two ways to submit code to the sane-project/backends
repository: directly pushing to master and creating a merge request on
GitLab. I'd like to propose we only allow the use of the latter option.

Direct pushes have the risk of accidentally breaking the build or tests.
Our CI setup tests builds on 5 environments, I doubt that everyone would
test all configurations that are automatically covered by the CI for
each code submission. Personally, going through merge requests was
really worth the 20 seconds that it takes to open one, as numerous
issues have been found on GitLab CI.

Additionally, merge requests on GitLab always use master branch as the
first parent. This is important, because it allows various tooling to
use the `--first-parent` flag to iterate through merges to the master
branch ignoring the commits. As a result it's possible to e.g. bisect
some issue picking only the merges on the master branch which makes the
process much more efficient, as intermediate commits on side branches
don't even build a lot of the time. As it stands now, it would only take
a single merge of the current master branch to an old enough commit to
prevent such tooling working altogether. There have already been several
occasions of such reverse merges happening, fortunately they used not
too old commits as the first parent.

What do you think about this?

Regards,
Povilas




More information about the sane-devel mailing list