If I set New Code > Project Settings to “Previous version” the first push of a branch always comes up green (but no analysis done), subsequent pushes “do the right thing” as long as the developer doesn’t rebase their branch. If they rebase all sorts of non-branch code starts showing up in the “new code” analysis.
If I change that and for New Code > Project Settings I set “Reference Branch: Main”:
… and for New Code > main branch I set “Previous version”.
I would expect that every branch would be compared against the main branch, what happens is that the New Code analysis comes up blank, with the message:
This branch could not be compared to its reference branch. See the SCM or analysis report for more details.
No matter how many times a branch is revised and pushed the same message appears.
Neither setting seems to work quite right.