commit | 03fc0306cd943a65c987730dfc48b70ad2020ef3 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Wed Jun 23 10:43:24 2021 +0200 |
committer | Edwin Kempin <ekempin@google.com> | Tue Jun 29 16:38:24 2021 +0200 |
tree | b64bb7c2872b4d0674afed88ab2cf0dceeb9fe44 | |
parent | a792738fa92720a04eb375f6af8b22b015ca7fa0 [diff] |
Make all callers of ChangedFiles go through getOrCompute Earlier it was required to pass in the RevWalk instance into ChangedFiles when validating newly created commits, because commits that were newly created in the CreateChange REST endpoint where only visible through the specific RevWalk instance that was used when creating the commit (any newly created RevWalk instance was not seeing the commit and any attempt to look it up failed with a MissingObjectException). Due to this the validation could not use the new diff cache (aka DiffOperations), as the new diff cache didn't allow to pass in a RevWalk instance. Since passing in a RevWalk instance is no longer needed (see change Ie8d447b79 and change I489c26ac3) we can now also use the new diff cache for the validation. With this change all callers of ChangedFiles use the getOrCompute methods now. The getOrCompute methods will either retrieve the changed files from the new diff cache or compute them newly depending on the setting for the CodeOwnersExperimentFeaturesConstants#USE_DIFF_CACHE experiment flag. At the moment using the new diff cache is disabled by default, but once we are sure that its performance is fine, we will make the switch to always use it. Then we will also want to drop the code for computing changed files on our own. While we are at this, remove the PatchListNotAvailableException from the method signatures as this exception is never thrown. Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: Ie703498f2ad39e8a9802c143364e63b5a7ac6b2a
This plugin provides support for defining code owners for files in a repository.
If the code-owners plugin is enabled, changes can only be submitted if all touched files are covered by approvals from code owners.
Also see resources/Documentation/about.md.
IMPORTANT: Before installing/enabling the plugin follow the instructions from the setup guide, see resources/Documentation/setup-guide.md.