)]}'
{
  "commit": "e24d73a9330b19b12d511a48bfe2cc6ee107f3d7",
  "tree": "5a39cff0b74998c87409a8842b7b973a6f95e2ee",
  "parents": [
    "5301b71d9dd4d9e2d03040e5d465c8e6560389e7"
  ],
  "author": {
    "name": "Antonio Barone",
    "email": "syntonyze@gmail.com",
    "time": "Mon Dec 04 22:02:54 2023 +0100"
  },
  "committer": {
    "name": "Antonio Barone",
    "email": "syntonyze@gmail.com",
    "time": "Thu Jan 11 22:14:13 2024 +0100"
  },
  "message": "Allow refs filtering for non-delta fetches\n\nChange I19d58638 introduced the ability to filter out refs from the\nfetch-replication deltas. That is, the pull-replication plugin could\ndelegate other plugins to influence which refs should be fetched from\nthe remote source.\n\nThis mechanism however, was not working when receiving a request to\nfetch from a source, without an explicit list of refs (for example via\nthe `pull-replication start` SSH command).\n\nIn this case the pull-replication was blindly fetching all matching refs\nfrom the source.\n\nWhen fetching from source without any explicit refs (i.e. no delta),\ncompare the remote refs that match the configured refSpecs against the\nlocal refs and select only the ones needing to be created or updated.\n\nThe resulting list can then be passed on, as for the delta-case, to the\nprovided fetch-filter implementation.\n\nIn a multi-site setup, this allows to check the resulting refs against\nthe global-refdb so that no already-in-sync refs are fetched (details on\nsuch implementation can be found at If60f5f5ea).\n\nNote that this change does nothing to validate fetching of refs that do\nnot currently exist locally or that have been removed from the remote.\n\nThese concerns are captured as separate issues in [1] and [2],\nrespectively.\n\n[1] https://issues.gerritcodereview.com/issues/316844804\n[2] https://issues.gerritcodereview.com/issues/316844806\n\nBug: Issue 40014518\nChange-Id: I29507376e9e4339d8a0517fcabd566014963a8ad\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d02cb02077686d6b158a2405c2e785fbbc17e9ed",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchOne.java",
      "new_id": "66aa8d483bbccdad657f962bab195142e12519fc",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchOne.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e536aadde35d137a496d3b2dc7b619df1dba8f47",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/replication/pull/FetchRefsDatabase.java"
    },
    {
      "type": "modify",
      "old_id": "51d0a534b6319111a7332583e72a4a9029d5804a",
      "old_mode": 33188,
      "old_path": "src/main/resources/Documentation/cmd-start.md",
      "new_id": "057567f7515651336f70fdb1b6ec1ac71a300768",
      "new_mode": 33188,
      "new_path": "src/main/resources/Documentation/cmd-start.md"
    },
    {
      "type": "modify",
      "old_id": "3445604f53dbce3aad227a82ab38bf355e0c83cc",
      "old_mode": 33188,
      "old_path": "src/test/java/com/googlesource/gerrit/plugins/replication/pull/FetchOneTest.java",
      "new_id": "86b0792f0fcb354517b4deae6dd0e06093232078",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/replication/pull/FetchOneTest.java"
    }
  ]
}
