Small readability improvement: replace arithmetics with logic

Change-Id: I26ba7a60024685bb1f613906091a93b469036b67
This commit is contained in:
Joerg Zieren
2020-02-13 17:54:15 +01:00
parent f4613afa5f
commit 6bc2f50595

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;
}