)]}'
{
  "commit": "43157175b549b7d72c3e79fb212769cc1f6acfa5",
  "tree": "609284436e322e5e910198efb4af9424417d96be",
  "parents": [
    "9e0207b50b3f1281d8fa72e255037683c0654dd0"
  ],
  "author": {
    "name": "Kristofer Karlsson",
    "email": "krka@spotify.com",
    "time": "Fri Oct 23 13:11:58 2026 +0000"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Fri Oct 23 08:32:30 2026 -0700"
  },
  "message": "connected: add incremental connectivity check via rev-list\n\nThe full connectivity check uses rev-list to find commits\nreachable from the incoming tips but not from the\nalready-connected side, then walks their object closure.  Commit\ntraversal stops at the connectivity boundary, but trees and blobs\nreachable from that boundary still need to be walked so they can\nbe marked uninteresting, allocating a struct object for each one.\nOn repositories where the boundary commits have large trees, the\nconnectivity check for small incoming changes visits and tracks\nmore objects than needed.\n\nAdd an alternative connectivity check that verifies incoming\ncommits incrementally against their parents.\n\nThe verifier processes incoming commits with ancestors first and\ncompares each new tree against its trusted parent trees.  Entries\nalready seen on the trusted side are skipped by OID, so unchanged\nsubtrees need not remain at the same path to be recognized.\nChanged subtrees are recursively compared against same-path parent\nsubtrees, and new subtrees without a comparison base are verified\nfrom scratch.\n\nSee Documentation/technical/connectivity-check.adoc for the trust\ninvariants and detailed algorithm.\n\nThe incremental check runs inside rev-list, selected by the\ninternal --connectivity-check option.  After the normal\nrevision walk identifies the incoming commits, the verifier\nconsumes them before the usual object traversal; any pending\nnon-commit tips are still handled by the existing traversal.\n\nPartial-clone semantics are preserved: objects promised by a\npromisor remote are accepted as connected, and on-demand fetching\nis prevented by excluding promisor objects from traversal.\n\nA new transfer.connectivityCheck value \"incremental\" selects the\nnew mode, with \"full\" remaining the default.  Deepening fetches\nfall back to the full check because they do not have the normal\nexisting-reference boundary, and traversal instead follows the\neffective shallow boundary.\n\nClones and pushes into an empty repository also use the full\ncheck.  Without negative revisions there is no trusted boundary,\nand the incremental check would have to verify all of history\nfrom scratch like the full check does, with extra per-commit\noverhead on top.  On git.git, checking 70K commits without a\nboundary takes 5.3s with the full check and 9.2s with the\nincremental one.\n\np5413 results (best of 3), scaling one dimension at a time.\nEach fixture is a repository with a flat tree of many\ndirectories containing 100 files each.  The incoming set is a\nchain of commits on top of the existing history, with each\ncommit changing files in different directories round-robin.\nThe three axes vary the total repository tree size, the number\nof incoming commits, and the number of files changed per\nincoming commit.\n\nScaling tree size (10 incoming commits, 10 files/commit):\n\n    files    full  incr.  full/incr\n      5K    0.01s  0.01s    1.0x\n     50K    0.04s  0.01s    4.0x\n    200K    0.13s  0.01s   13.0x\n    800K    0.54s  0.03s   18.0x\n\nThe full mode must walk the trees of boundary commits, which\ngrows with overall tree size.  Incremental still scans the\nroot trees, but avoids descending into unchanged subtrees,\nso it grows much more slowly with repository size.\n\nScaling incoming commit count (200K files, 10 files/commit):\n\n    commits    full  incr.  full/incr\n          1    0.13s  0.01s   13.0x\n         10    0.13s  0.01s   13.0x\n        100    0.16s  0.06s    2.7x\n        500    0.29s  0.25s    1.2x\n       3000    1.14s  1.44s    0.8x\n       5000    1.87s  2.39s    0.8x\n      10000    3.45s  5.13s    0.7x\n\nWith many commits the per-commit overhead of scanning both\nthe new and parent root trees accumulates and incremental\nbecomes slower.  Breakeven is between 500 and 3000 commits\nand the ratio stabilizes near 0.7x for this fixture.\n\nScaling files per incoming commit (200K files, 10 commits):\n\n    files/commit    full  incr.  full/incr\n               1    0.13s  0.01s   13.0x\n              10    0.13s  0.01s   13.0x\n             100    0.15s  0.03s    5.0x\n             500    0.23s  0.13s    1.8x\n            1000    0.34s  0.27s    1.3x\n            2000    0.65s  0.56s    1.2x\n\nThe advantage shrinks as more files change per commit, but\nincremental stays slightly faster even at 2000 files/commit,\nwhere every directory is touched.\n\nSelected peak RSS measurements from the same fixtures:\n\n    case                        full    incr.  ratio\n    200K files, 10 commits      31 MB    12 MB   0.4x\n    800K files, 10 commits     110 MB    26 MB   0.2x\n    200K files, 5000 commits   155 MB   151 MB   1.0x\n\nIncremental uses less memory when it can prune enough of the\nboundary tree walk.  In the long-history case the two modes\nvisit similar object sets and memory converges.\n\nThe regression cases in the CPU benchmarks are in wall-clock\ntime rather than memory, primarily from scanning some trees\nmore than once: a commit\u0027s tree is read as a candidate when the\ncommit is verified, and again as a trusted parent tree when its\nchildren are verified.\n\nSigned-off-by: Kristofer Karlsson \u003ckrka@spotify.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "811456f1bfad94323cbea334e64e4223909f9bc5",
      "old_mode": 33188,
      "old_path": "Documentation/config/transfer.adoc",
      "new_id": "cba7597a584e0c9fc80b219d47356f06c9bb0ea0",
      "new_mode": 33188,
      "new_path": "Documentation/config/transfer.adoc"
    },
    {
      "type": "modify",
      "old_id": "3979a142a590efaeffe20b4632069abd63071a43",
      "old_mode": 33188,
      "old_path": "Documentation/rev-list-options.adoc",
      "new_id": "2023ad5f7544472fbb9bfe1c3dd14b10071d2871",
      "new_mode": 33188,
      "new_path": "Documentation/rev-list-options.adoc"
    },
    {
      "type": "modify",
      "old_id": "a112d5be3e16632e835c5d105d3361359d17390e",
      "old_mode": 33188,
      "old_path": "Documentation/technical/connectivity-check.adoc",
      "new_id": "8b7d619d4c8bc06163ef267fa67b3c5e5e9d7826",
      "new_mode": 33188,
      "new_path": "Documentation/technical/connectivity-check.adoc"
    },
    {
      "type": "modify",
      "old_id": "a96be506b59f2d3fb142b2d099b6aac54dfc3764",
      "old_mode": 33188,
      "old_path": "Makefile",
      "new_id": "fa42e295e22b134c3dac4d3c27d92ddde0209eb5",
      "new_mode": 33188,
      "new_path": "Makefile"
    },
    {
      "type": "modify",
      "old_id": "619855f4e44258201541e4cf0999470dd0a94b61",
      "old_mode": 33188,
      "old_path": "builtin/rev-list.c",
      "new_id": "c07ad6e30ccd864361de1e3cdcfafe584941c978",
      "new_mode": 33188,
      "new_path": "builtin/rev-list.c"
    },
    {
      "type": "modify",
      "old_id": "0147b7d3b357160f8c99f79d5104bec11428cf47",
      "old_mode": 33188,
      "old_path": "connected.c",
      "new_id": "c0329874100adf650852f90080a3f5f493f1b0ab",
      "new_mode": 33188,
      "new_path": "connected.c"
    },
    {
      "type": "modify",
      "old_id": "0a95d90d211fd61343fe9d5880da894aface557e",
      "old_mode": 33188,
      "old_path": "meson.build",
      "new_id": "d94dedc26cc0c627654d4ec544f14d6ce2d9ab71",
      "new_mode": 33188,
      "new_path": "meson.build"
    },
    {
      "type": "modify",
      "old_id": "f65eb04684b669d72f1d22840ccbc2a9bd6dbfe6",
      "old_mode": 33188,
      "old_path": "t/meson.build",
      "new_id": "b23b4c90b0427b69abbbe4d92a386fcbcacd26a5",
      "new_mode": 33188,
      "new_path": "t/meson.build"
    },
    {
      "type": "modify",
      "old_id": "9e968d01067f67dd96947943abed4ab927058bd7",
      "old_mode": 33261,
      "old_path": "t/perf/p5413-connectivity-check.sh",
      "new_id": "250140a79abf638e217f62fde08fdc83a4a7a65d",
      "new_mode": 33261,
      "new_path": "t/perf/p5413-connectivity-check.sh"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "109ad17cfffcafba99a1f00e4dae0eaac900d875",
      "new_mode": 33261,
      "new_path": "t/t5413-connectivity-check.sh"
    },
    {
      "type": "modify",
      "old_id": "0f6a2ad9b593f4c3c6f4f9b9eb25e29acdc45495",
      "old_mode": 33261,
      "old_path": "t/t6700-tree-depth.sh",
      "new_id": "edb31e3914251fc71baa268a4b416d5aa7b575d6",
      "new_mode": 33261,
      "new_path": "t/t6700-tree-depth.sh"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "25db76d30ba58e79099b6194433e1efa09d31b60",
      "new_mode": 33188,
      "new_path": "tree-verify.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ac7092da1cb0c31823ada0d1ff057c03946576e0",
      "new_mode": 33188,
      "new_path": "tree-verify.h"
    }
  ]
}
