Do not warn when change's parent commit isn't a change

Changes can be based on commits SHA1s that aren't a change
and therefore are not searchable by SHA1 (e.g. a commit pushed
directly to a branch or an automatic merge commit produced by
Gerrit). It isn't useful to warn on the error_log that there are
no changes associated to the SHA1, hence give a warning only when
the number of changes is greater than the expected one.

Release-Notes: skip
Change-Id: Id52b68769ac550cf1d1abdd31e93bb762577b570
diff --git a/java/com/google/gerrit/server/change/ParentDataProvider.java b/java/com/google/gerrit/server/change/ParentDataProvider.java
index 48ab59d..c0a1ffe 100644
--- a/java/com/google/gerrit/server/change/ParentDataProvider.java
+++ b/java/com/google/gerrit/server/change/ParentDataProvider.java
@@ -98,12 +98,14 @@
   private Optional<ParentCommitData> getFromGerritChange(
       Project.NameKey project, ObjectId parentCommitId, String targetBranch) {
     List<ChangeData> changeData = queryProvider.get().byCommit(parentCommitId.name());
-    if (changeData.size() != 1) {
+    if (changeData.size() > 1) {
       logger.atWarning().log(
-          "Did not find a single change associated with parent revision %s (project: %s). Found changes %s.",
+          "Found more than one change associated with parent revision %s (project: %s). Found changes %s.",
           parentCommitId.name(),
           project.get(),
           changeData.stream().map(ChangeData::getId).collect(ImmutableList.toImmutableList()));
+    }
+    if (changeData.size() != 1) {
       return Optional.empty();
     }
     ChangeData singleData = changeData.get(0);