Issue 730: Feature to prevent accidental merges
Status:  New
Owner: ----
Reported by di...@google.com, Sep 14, 2010
We are using Gerrit in a setup where we have many separate (let's all them "topic") branches, all forked from the vanilla kernel and a single "master" branch that has all the other branches merged in (there is a script that does this automatically). The problem is that sometimes, users push code reviews of merges of the "master" branch on top of their "topic" branch. Because Gerrit doesn't show much in the code review diff when that happens usually these get reviewed and submitted. When that happens, that topic branch is basically "broken". Reverting it (force updating the branch to a point in the past) on the server is a complex to impossible process as these branches as I said are automatically merged in by scripts and one would have to revert history in all sorts of branches, not to mention if someone makes a commit on top of the branch that merged the "master" branch they would lose that history if we are to revert it.

It would help if there was a configurable option for Gerrit to display a warning on the review page if the pending (merge) commit brings in more than a (configured) number of commits (which is what happens when merging a big branch by mistake).