commit | 52423b142a16bf47b937bfbba0500087e3b67807 | [log] [tgz] |
---|---|---|
author | David Pursehouse <dpursehouse@collab.net> | Thu Jul 25 10:24:45 2019 +0900 |
committer | David Pursehouse <dpursehouse@collab.net> | Thu Jul 25 10:27:07 2019 +0900 |
tree | 14bc8dbec20727d9e96cf79d999653eebc0be6e1 | |
parent | 2a389469be6b48a8d0823a34c86b162496e8bc12 [diff] |
ReceiveCommits: Fix comparison to ensure correct log message The condition added in change Ie838da01c prevents the commit count from being incremented, resulting in the log message: "Validated {} new commits" always showing "0 new commits". Change-Id: I44456dfa3587fac1cac29d61ded51203274ae940
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/git/receive/ReceiveCommits.java b/gerrit-server/src/main/java/com/google/gerrit/server/git/receive/ReceiveCommits.java index fba4aec..ef1f22f 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/git/receive/ReceiveCommits.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/git/receive/ReceiveCommits.java
@@ -2748,7 +2748,7 @@ // Even if skipValidation is set, we still get here when at least one plugin // commit validator requires to validate all commits. In this case, however, // we don't need to check the commit limit. - if (!skipValidation && ++n > limit) { + if (++n > limit && !skipValidation) { logDebug("Number of new commits exceeds limit of {}", limit); addMessage( "Cannot push more than "