Merge "Small readability improvement: replace arithmetics with logic"

This commit is contained in:
David Pursehouse
2020-03-02 09:48:08 +00:00
committed by Gerrit Code Review

View File

@@ -630,9 +630,7 @@ class ReceiveCommits {
}
}
int commandTypes = (magicCommands.isEmpty() ? 0 : 1) + (regularCommands.isEmpty() ? 0 : 1);
if (commandTypes > 1) {
if (!magicCommands.isEmpty() && !regularCommands.isEmpty()) {
rejectRemaining(commands, "cannot combine normal pushes and magic pushes");
return;
}