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();
|
RevWalk walk = receivePack.getRevWalk();
|
||||||
walk.reset();
|
walk.reset();
|
||||||
walk.sort(RevSort.NONE);
|
walk.sort(RevSort.NONE);
|
||||||
@@ -3059,7 +3060,6 @@ class ReceiveCommits {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
BranchCommitValidator validator = commitValidatorFactory.create(projectState, branch, user);
|
|
||||||
if (!validator.validCommit(
|
if (!validator.validCommit(
|
||||||
walk.getObjectReader(), cmd, c, false, messages, rejectCommits, null, skipValidation)) {
|
walk.getObjectReader(), cmd, c, false, messages, rejectCommits, null, skipValidation)) {
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user