commit | 8a5f8810cdbaf239ebca79be9e11ce6ebe7800b0 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Fri Mar 05 11:27:03 2021 +0100 |
committer | Edwin Kempin <ekempin@google.com> | Wed Mar 10 09:14:44 2021 +0100 |
tree | c665be61d03540bfeabbfee0472093c51f327621 | |
parent | 2ab24deff46f69cd109820ea44f9eced34a8e121 [diff] |
Remove sorting of owned paths to avoid that all owned paths are computed Change Id33722dc0 added a limit to the stream that computes the owned paths. However this limit has no real effect while the stream gets sorted. This is because in order to sort all results have to be available and hence be computed. Only afterwards the limit is applied. This means the limit only reduces the number of returned owned path, but doesn't prevent that all owned paths are computed. To avoid the computation of all owned paths we remove the sorting on the stream. Instead the sorting should happen before the stream computation is done, which means we must sort the changed files which are the input for this computation. Fortunately these changed files are already sorted. So all we should do is, document this fact in the ChangedFiles API and return an ImmutableList instead of an ImmutableSet. Also we add tests to verify that ChangedFiles returns sorted ChangeFile's. The integration tests for owned paths already verify that they are returned in a sorted order. Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I0953333649a8c9ada3043e4169ac6abcf5eb3f9a
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.