Merge "ReceiveCommits: Don't instantiate BranchCommitValidator repeatedly" into stable-2.16
This commit is contained in:
@@ -3033,6 +3033,7 @@ class ReceiveCommits {
|
||||
}
|
||||
}
|
||||
|
||||
BranchCommitValidator validator = commitValidatorFactory.create(projectState, branch, user);
|
||||
RevWalk walk = receivePack.getRevWalk();
|
||||
walk.reset();
|
||||
walk.sort(RevSort.NONE);
|
||||
@@ -3059,7 +3060,6 @@ class ReceiveCommits {
|
||||
continue;
|
||||
}
|
||||
|
||||
BranchCommitValidator validator = commitValidatorFactory.create(projectState, branch, user);
|
||||
if (!validator.validCommit(
|
||||
walk.getObjectReader(), cmd, c, false, messages, rejectCommits, null, skipValidation)) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user