ReceiveCommits: Don't instantiate BranchCommitValidator repeatedly
Change-Id: Ifd842896a369af9d7ffe04885d62e8d2c203faaa
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