)]}'
{
  "commit": "eb6730584fc5963eb7306af0073cc90cf45636bd",
  "tree": "63a7a41d04a5e3e7f97bd171d2843c6ab468cc02",
  "parents": [
    "095d73f5682e9b6bb150bdb95035d06204d6797c"
  ],
  "author": {
    "name": "Edwin Kempin",
    "email": "ekempin@google.com",
    "time": "Tue Mar 09 13:29:09 2021 +0100"
  },
  "committer": {
    "name": "Edwin Kempin",
    "email": "ekempin@google.com",
    "time": "Tue Mar 09 18:12:24 2021 +0100"
  },
  "message": "Disable rename detection when computing changed files\n\nTo detect renames Git must compare file contents of deleted and added\nfiles. Loading and comparing file contents is rather expensive and is\nlikely the reason why we are seeing a high latency for computing the\nchanged files for 1% of the changes.\n\nBy turning off the rename detection we expect that Git can do a pure\ntree diff without needing to load file contents, which should be much\nfaster.\n\nThe rename detection in DiffFormatter is off by default, it gets turned\non only if either DiffFormatter#setDetectRenames(true) or\nDiffFormatter#setPathFilter(TreeFilter.FOLLOW) is called. We rely on the\ndefault since it\u0027s very unlikely that this default will ever change (and\nif it does our rename tests will start failing).\n\nTurning off the rename detection affects the Get Code Owner Status REST\nendpoint. For renamed files it now returns 2 file code owner statuses,\none for the old path and one for the new path.\n\nExample:\n\n* old:\n\n  ...\n  {\n    \"change_type\": \"RENAMED\",\n    \"old_path_status\" {\n      \"path\": \"user-introduction.txt\",\n      \"status\": \"INSUFFICIENT_REVIEWERS\"\n    },\n    \"new_path_status\" {\n      \"path\": \"docs/user-intro.md\",\n      \"status\": \"APPROVED\"\n    }\n  }\n  ...\n\n* new:\n\n  ...\n  {\n    \"change_type\": \"ADDED\",\n    \"new_path_status\" {\n      \"path\": \"docs/user-intro.md\",\n      \"status\": \"APPROVED\"\n    }\n  },\n  {\n    \"change_type\": \"DELETED\",\n    \"old_path_status\" {\n      \"path\": \"user-introduction.txt\",\n      \"status\": \"INSUFFICIENT_REVIEWERS\"\n    }\n  }\n  ...\n\nThis change in behaviour requires an update in the frontend, otherwise\nthe code owner status icon for renamed files in the file list could be\nwrong, as it would only considers the status for the new path, but not\nfor the old path.\n\nThe tests with renamed paths have been adapted accordingly. Since paths\nare always returned in alphabetical order, the tests know which path\n(new or old path) is returned first in the response and hence the\nassertions can rely on this order.\n\nSigned-off-by: Edwin Kempin \u003cekempin@google.com\u003e\nChange-Id: I9a1d6ba9d23b2ba2b5fe2c8afcc0ed0598400041\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4fdab6579c7ec7ceade631404a46e547d5b10dc6",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/plugins/codeowners/backend/ChangedFiles.java",
      "new_id": "c96af172a1f9eedf03908ca786cbc18e4cb06053",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/plugins/codeowners/backend/ChangedFiles.java"
    },
    {
      "type": "modify",
      "old_id": "805eccd7408e47956e706081e00514f0bc186769",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/plugins/codeowners/testing/ChangedFileSubject.java",
      "new_id": "069122c0a1e0f09a678bea8ed41e0ac4b4dbf1be",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/plugins/codeowners/testing/ChangedFileSubject.java"
    },
    {
      "type": "modify",
      "old_id": "03948f17ad3f8c1473b9414629a90749c3bf6f34",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/plugins/codeowners/testing/FileCodeOwnerStatusSubject.java",
      "new_id": "3a81908966c8b18123e1d680c69ba8b1e82c3912",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/plugins/codeowners/testing/FileCodeOwnerStatusSubject.java"
    },
    {
      "type": "modify",
      "old_id": "85a0f04bfe34ca5e6b7ab366136a28271286a292",
      "old_mode": 33188,
      "old_path": "javatests/com/google/gerrit/plugins/codeowners/acceptance/api/GetCodeOwnerStatusIT.java",
      "new_id": "531f1186ed810316480d9d3b368d5d91fe706bf1",
      "new_mode": 33188,
      "new_path": "javatests/com/google/gerrit/plugins/codeowners/acceptance/api/GetCodeOwnerStatusIT.java"
    },
    {
      "type": "modify",
      "old_id": "3cf1aaf1b457915d9310dc07f657f9b89eff6a2c",
      "old_mode": 33188,
      "old_path": "javatests/com/google/gerrit/plugins/codeowners/backend/ChangedFilesTest.java",
      "new_id": "34e0cb2d99a72a1ef3531820219334cba1b6efb6",
      "new_mode": 33188,
      "new_path": "javatests/com/google/gerrit/plugins/codeowners/backend/ChangedFilesTest.java"
    },
    {
      "type": "modify",
      "old_id": "f2c55e4f8208a8dbf88ba180e631e620d6e323bf",
      "old_mode": 33188,
      "old_path": "javatests/com/google/gerrit/plugins/codeowners/backend/CodeOwnerApprovalCheckTest.java",
      "new_id": "d23f647b4004b0e0ae459fdd7c8c530d09f095f0",
      "new_mode": 33188,
      "new_path": "javatests/com/google/gerrit/plugins/codeowners/backend/CodeOwnerApprovalCheckTest.java"
    },
    {
      "type": "modify",
      "old_id": "c0e608b65de62dc061b5f5fa89a6de93f516bbaa",
      "old_mode": 33188,
      "old_path": "resources/Documentation/rest-api.md",
      "new_id": "29d5fd8ea8b6468f1dc016df986ef419ca465434",
      "new_mode": 33188,
      "new_path": "resources/Documentation/rest-api.md"
    }
  ]
}
