)]}'
{
  "commit": "9581041144f59218b94b069ed200944d1543d0e9",
  "tree": "5c076abd8397dce36272b12899c688ccd2f26790",
  "parents": [
    "e99704d35c61e078329c7a655f11044ed2014d0b"
  ],
  "author": {
    "name": "Fabio Ponciroli",
    "email": "ponch78@gmail.com",
    "time": "Wed Feb 12 16:16:37 2025 +0100"
  },
  "committer": {
    "name": "Fabio Ponciroli",
    "email": "ponch78@gmail.com",
    "time": "Wed Feb 12 12:14:03 2025 -0800"
  },
  "message": "Lookup by change number in ChangeFinder::find\n\nAccording to the documentation [1] a change number can be used as\n{change-id} if \"it uniquely identifies one change\".\n\nIn case of imported changes this is not working since\n`ChangeFinder::find` looks up by legacy change ID. Legacy change ID is\nused as the document id in Lucene, which in case of imported changes\ndoesn\u0027t correspond to the change number. The correct way of searching\nfor a change is via the `change` field.\n\nThe use of legacy change ID was breaking REST-API calls like:\n* changes/%s/revisions/%s/related\n* changes/%s/revisions/%s/files\n\nand potentially many other REST-API based on the ChangesCollection to\ndiscover the change by its number.\n\nNOTE: This change impacts only the direct REST-API calls from scripting\nas the UI always uses the format \u003cproject-name\u003e~\u003cchange-num\u003e.\n\n[1]:\nhttps://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#change-id\n\nBug: Issue 396060185\nRelease-Notes: Lookup by change number in ChangeFinder::find\nChange-Id: I6c57ea2a6caa9e33152955746c9c4d3d446a4d73\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5668c27902166b27408915de2b606bf2bc131696",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/server/change/ChangeFinder.java",
      "new_id": "be4fe16635da18293e9fd0ce4cc225c777f0f1cf",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/server/change/ChangeFinder.java"
    },
    {
      "type": "modify",
      "old_id": "864a382ff0230f705d887543e93c6234a84bb42c",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/server/query/change/ChangeData.java",
      "new_id": "878994ecf52c08425833ec377bb2b6c09c48960b",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/server/query/change/ChangeData.java"
    }
  ]
}
