Validation: Do not reject imports that are added in the same commit

If a commit is validated that contains a code owner config with a new
import of a code owner config file that is added in the same commit, the
commit was wrongly rejected saying that the imported code owner config
was not resolveable. This was because we looked for the imported code
owner config in the HEAD revision of the branch. Instead we should look
it up from the commit from which also the importing code owner config
was loaded.

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I32b0d8b9f3699e012e8c904e8602635e3a92a491
2 files changed
tree: a59588e469f44321d4687c6a796a0b4991042aa1
  1. java/
  2. javatests/
  3. proto/
  4. resources/
  5. test/
  6. ui/
  7. .eslintrc.json
  8. .gitignore
  9. .gitreview
  10. bower.json
  11. BUILD
  12. LICENSE
  13. package-lock.json
  14. package.json
  15. README.md
README.md

Gerrit Code Review code-owners plugin

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