You can change project options in GerritTo fast-forward only, This would prevent the change from going in as it is not a fast forward merge. Then forcing developer2 to git pull --rebase and push again, now the change that developer1 did will be part of the verification.