)]}'
{
  "commit": "7eda21f972b8edb64ed8dcd949ab369da11437df",
  "tree": "b902cce71eed6885947d70861dd87a46b62d41ad",
  "parents": [
    "612e0cf15b2711e530c507dab295f411672345a0"
  ],
  "author": {
    "name": "tanzhengwei",
    "email": "tanzhengwei@google.com",
    "time": "Mon May 09 02:00:51 2022 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Mon May 09 02:02:05 2022 -0700"
  },
  "message": "Fix OOM with somepath due to infinite loop.\n\nThis only happens when a `from` target is in the cycle, and the infinite loop occurs when we traverse a parent-edge loop. If the `from` target is not in the cycle, a parent-edge loop is never created because the parent-edges are already set.\n\n**Fix:** Prevent parent-edges from being created from `from` targets to another `from` target, the idea here is that parents of a `from` target are not relevant to `somepath`.\n\n**Implications:** In the case where `from` targets are dependencies of each other, the path going through other `from` targets will not be considered since all `from` targets are treated as \"root\" level targets. For example:\n\n`somepath(//foo:a + //foo:transitive_dep_of_a, //foo:transitive_dep_of_both)` where this code will now only output the path from `//foo:transitive_dep_of_a -\u003e //foo:transitive_dep_of_both` and never `//foo:a -\u003e //foo:transitive_dep_of_a -\u003e //foo:transitive_dep_of_both`.\n\nPiperOrigin-RevId: 447410138\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "98c2742e689e88634e7b5e94878ed275e68518bc",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/query2/query/PathLabelVisitor.java",
      "new_id": "df13235aeca6a3670462b8a564399d5cc0c9f400",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/query2/query/PathLabelVisitor.java"
    },
    {
      "type": "modify",
      "old_id": "128175b9c693ab9d5696fc747e5914a547dfe308",
      "old_mode": 33261,
      "old_path": "src/test/shell/integration/bazel_query_test.sh",
      "new_id": "5e2285691148cb74ccabc30e76d603629cb06900",
      "new_mode": 33261,
      "new_path": "src/test/shell/integration/bazel_query_test.sh"
    }
  ]
}
