Is there a way to get Gerrit to have all the commits in the branch in order to put pressure on the code view?

Gerrit will bring together potentially invisible changes that were previously in the commit history and are located in another repository branch. Here is an example:

  • checker gerrit branch devel
  • create file1.txt, add, commit, click refs/heads/temp_branch
  • create a file2.txt, add, commit, click on refs/for/develto verify the code

When file2.txt is accepted and merged, file1.txt, because it is up and not in a separate change branch, marked as being in the process of verification, is also merged. This is potentially very problematic and the only solution I can find with the goal of causing every change that has been ported to each branch to be checked by code. This is not ideal, since you can have some branches with one group approving or without code verification (for some code replacement?).

The solution is to force each commit in the history to be placed in the code overview, as would be the case if file1.txt had not been moved to another branch in the same repository.

Is there a parameter in Gerrit that imposes this rule? Can anyone think of a workflow that allows you to freely click on refs/heads/without risking polluting other branches?

Many thanks.

+2
source share
1 answer

I suspect you are seeing this behavior because the commit in step 3 has step 2 as the parent. You cannot send a commit if all of his parents have not been sent. I agree with you that this seems like a bug in Gerrit - it should refuse to submit until the second step is presented.

Try this workaround - add step 2a after step 2:

2a. check branch devel again

If commits are collected in 2 different branches, it makes no sense for them to be linear.

- ? , , , , , . , .

+2

Source: https://habr.com/ru/post/1665549/


All Articles