)]}'
{
  "commit": "cbfd4cb86f78054a0b824b86f058240c162612e0",
  "tree": "90f5775b5fd250f7afc90fbdeb0a02d8bbed74f3",
  "parents": [
    "c96b05a9c26b5edb3e8c1b9491b386ddc70035f8"
  ],
  "author": {
    "name": "Patrick Steinhardt",
    "email": "ps@pks.im",
    "time": "Thu Oct 08 10:36:02 2026 +0200"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Thu Oct 08 07:31:19 2026 -0700"
  },
  "message": "odb/source-files: move alternates into the backend\n\nOriginally, when designing pluggable object databases the goal was that\nthe object database can have multiple sources, and every source attached\nto it could use a different backend. This would have allowed for quite a\nlot of flexibility, as you could trivially mix and match different kinds\nof object storages in whatever way you like.\n\nBut while well-intentioned, this design led to a bunch of conceptual\nproblems:\n\n  - We\u0027re now trying to read objects in source order, whereas we\n    previously tried to read objects via packfiles before trying to read\n    them via loose objects. This led to a performance regression when\n    using alternates or when using a quarantine directory.\n\n  - Some data structures are supposed to only ever exist once, like for\n    example bitmaps and commit graphs. At the same time, those data\n    structures also span across the union of all objects, so they may\n    cross sources.\n\n  - It is unclear how we can extend GIT_OBJECT_DIRECTORY or\n    GIT_ALTERNATE_OBJECT_DIRECTORIES to become backend-agnostic in a\n    backwards-compatible way. In general, introducing an object storage\n    extension into the current status quo where alternates may have to\n    be extended to become generic was proving to be painful.\n\n  - Some mechanisms of alternates assume way too much about how exactly\n    their backends work. Alternate refs for example assume that the\n    alternate is backed by a filesystem path, and that this filesystem\n    path may also allow us to read references. This is not a given\n    though, as backends may not even have local data at all.\n\nIn short, there are a bunch of conceptual mismatches when we have\nalternates and pluggable object databases coexist. So while the original\nidea was nice, it does not result in a system that is easy to reason\nabout.\n\nCorrect course by moving alternates into the \"files\" source itself so\nthat it becomes an implementation detail thereof so that we can avoid\nall of these shortcomings. While it\u0027s unfortunate that we cannot easily\nmix and match sources now, that ability doesn\u0027t go away. It\u0027s still very\nmuch feasible to introduce a new backend that allows for exactly that\nuse case, and such a backend may also be a lot more flexible as we can\nnow add new logic to determine which objects should be stored where. So\nthe original motivation for having per-source backends can still be\nrealized with the new architecture.\n\nNote that as part of this move, we also handle the GIT_OBJECT_DIRECTORY\nand GIT_ALTERNATE_OBJECT_DIRECTORIES environment variables in the\n\"files\" backend. This may be surprising at first, but object directories\nare very much a concept of that backend, too. So these variables would\nhave bad interactions with other backends, and they create a bit of a\nmismatch with the eventual object storage extension that we plan to\nintroduce.\n\nNote that this commit is way larger than I\u0027d like it to be. I\u0027m sorry, I\ncouldn\u0027t find a way to split it up further. That being said, most of the\nchanges are straight-forward conversions that go from iterating over\nsources to iterating over object directories. The more involved changes\nare moving the infrastructure to track individual sources from \"odb.c\"\nand moving them into \"odb/source-files.c\".\n\nThis also serves to show a bit of a who\u0027s-who of commands that don\u0027t\nwork properly with pluggable object databases. Almost all of these\ncommands are related to housekeeping though -- some of them will be\nconverted eventually, like for example commit graphs or MIDXs. But many\nof them will stay incompatible going forward as they are simply too\nspecific to the \"files\" backend.\n\nSigned-off-by: Patrick Steinhardt \u003cps@pks.im\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f2abfaccec1c6f7b64e555ee0ec1368e8b39b2bb",
      "old_mode": 33188,
      "old_path": "builtin/count-objects.c",
      "new_id": "3f7b20fde531a3163511885841b62acc97c644fd",
      "new_mode": 33188,
      "new_path": "builtin/count-objects.c"
    },
    {
      "type": "modify",
      "old_id": "0bf76b028be2af793e72a6813bfa06e3dfef63dc",
      "old_mode": 33188,
      "old_path": "builtin/fast-import.c",
      "new_id": "5fc082bcc73c01f46833e13c2ca15fb3d7a83566",
      "new_mode": 33188,
      "new_path": "builtin/fast-import.c"
    },
    {
      "type": "modify",
      "old_id": "a4b21d2651e446dad46ceca131da7f773c713b96",
      "old_mode": 33188,
      "old_path": "builtin/fetch.c",
      "new_id": "2e9c14d4edd649c990d61199d62401105d5ed476",
      "new_mode": 33188,
      "new_path": "builtin/fetch.c"
    },
    {
      "type": "modify",
      "old_id": "9af4cc085bc3c154034a3df39c4705683a604efc",
      "old_mode": 33188,
      "old_path": "builtin/fsck.c",
      "new_id": "da90cf84bf099ee05b2119332340f7a66cb16c21",
      "new_mode": 33188,
      "new_path": "builtin/fsck.c"
    },
    {
      "type": "modify",
      "old_id": "7acd4f3215b737cb2072c9d36a2b64679cd4d11a",
      "old_mode": 33188,
      "old_path": "builtin/gc.c",
      "new_id": "28ada9f5660998af7086e47055deacd9c161f28e",
      "new_mode": 33188,
      "new_path": "builtin/gc.c"
    },
    {
      "type": "modify",
      "old_id": "70860b8f27748448f108afd199b263875685be8a",
      "old_mode": 33188,
      "old_path": "builtin/index-pack.c",
      "new_id": "0264c18c5f8adbf3cb014af848a8c61f7ad5dee1",
      "new_mode": 33188,
      "new_path": "builtin/index-pack.c"
    },
    {
      "type": "modify",
      "old_id": "fc8b494996159aa68fb09ebc2d972b8c4cf2bc79",
      "old_mode": 33188,
      "old_path": "builtin/multi-pack-index.c",
      "new_id": "c48212290cf81bf7ba9a31f4a60342a2ca59662a",
      "new_mode": 33188,
      "new_path": "builtin/multi-pack-index.c"
    },
    {
      "type": "modify",
      "old_id": "070659b6ed97f28f7f0102fd1570373b962bfed2",
      "old_mode": 33188,
      "old_path": "builtin/pack-objects.c",
      "new_id": "ca3a891dfbce3e23ff6be66ad4ca49ec4c6382b8",
      "new_mode": 33188,
      "new_path": "builtin/pack-objects.c"
    },
    {
      "type": "modify",
      "old_id": "a7e4678d117072a8e014b9eb67a68788b9437a04",
      "old_mode": 33188,
      "old_path": "builtin/prune.c",
      "new_id": "97f4c1418bc58eed693f889cb4f00b31a7d12295",
      "new_mode": 33188,
      "new_path": "builtin/prune.c"
    },
    {
      "type": "modify",
      "old_id": "f55a521b2a1f12e3570203304ce73c49af94c691",
      "old_mode": 33188,
      "old_path": "bundle.c",
      "new_id": "a81fd29505074e96933acb7049620621e905a6bc",
      "new_mode": 33188,
      "new_path": "bundle.c"
    },
    {
      "type": "modify",
      "old_id": "7cc486d14002c4842e7dc53534e55b2d8ce98299",
      "old_mode": 33188,
      "old_path": "commit-graph.c",
      "new_id": "673d54db293774de6fc7c32dd9ef1a58c4e8c3eb",
      "new_mode": 33188,
      "new_path": "commit-graph.c"
    },
    {
      "type": "modify",
      "old_id": "89240e47d61f3bb39570876635f065eefbad256a",
      "old_mode": 33188,
      "old_path": "diagnose.c",
      "new_id": "2c1bcfe43135a5629541eba6fbcc8a388ae712f7",
      "new_mode": 33188,
      "new_path": "diagnose.c"
    },
    {
      "type": "modify",
      "old_id": "aad07b1153ac354042e51a97f3a70d279df822bb",
      "old_mode": 33188,
      "old_path": "fetch-pack.c",
      "new_id": "b14e3ba71bcfe9e828f7c9fb0365167f7777203c",
      "new_mode": 33188,
      "new_path": "fetch-pack.c"
    },
    {
      "type": "modify",
      "old_id": "0a6c99f47190ba5d75ff612d9345b199f8767a28",
      "old_mode": 33188,
      "old_path": "http-walker.c",
      "new_id": "4f50dd9b8d02a4dd2686161479a58a7d458d27a6",
      "new_mode": 33188,
      "new_path": "http-walker.c"
    },
    {
      "type": "modify",
      "old_id": "fe6ec88a21b06ecdbc6eaca7a03910143542da25",
      "old_mode": 33188,
      "old_path": "http.c",
      "new_id": "230c4de494aa491b083ed408d847cf91bea94d1b",
      "new_mode": 33188,
      "new_path": "http.c"
    },
    {
      "type": "modify",
      "old_id": "957bf83e6b09fd5e37cef6680864406b138c0de8",
      "old_mode": 33188,
      "old_path": "loose.c",
      "new_id": "d6a2bb5ba3c877cdc3351895bcf092af615c2792",
      "new_mode": 33188,
      "new_path": "loose.c"
    },
    {
      "type": "modify",
      "old_id": "c0f82c41633bc0bafd8696d845577521cad14076",
      "old_mode": 33188,
      "old_path": "midx.c",
      "new_id": "8638ddf0be7f00ef229796b82c536124812c852d",
      "new_mode": 33188,
      "new_path": "midx.c"
    },
    {
      "type": "modify",
      "old_id": "8b54271c2768f87fac4e42a93df6111e12064e92",
      "old_mode": 33188,
      "old_path": "odb.c",
      "new_id": "98c5c862f56f4bd7510b5b759b0ab5e4114c5572",
      "new_mode": 33188,
      "new_path": "odb.c"
    },
    {
      "type": "modify",
      "old_id": "4143812f55e66f74c84f25ec58016674094ce71c",
      "old_mode": 33188,
      "old_path": "odb.h",
      "new_id": "0ccc47ee73fafa3af2905141bc6826668fe54ecd",
      "new_mode": 33188,
      "new_path": "odb.h"
    },
    {
      "type": "modify",
      "old_id": "6aaf6253523de80c87534a0bb5202b1f2b57936e",
      "old_mode": 33188,
      "old_path": "odb/source-files.c",
      "new_id": "072f515b36da3cac272127246de7b4562280596e",
      "new_mode": 33188,
      "new_path": "odb/source-files.c"
    },
    {
      "type": "modify",
      "old_id": "36af0c1b8ba0591641d2593e785dec130cceea0a",
      "old_mode": 33188,
      "old_path": "odb/source-files.h",
      "new_id": "837e8903044c2aa548bd05cfb3cab34ecc0622e5",
      "new_mode": 33188,
      "new_path": "odb/source-files.h"
    },
    {
      "type": "modify",
      "old_id": "30188b806d524dc687b374183b3cecd534738a56",
      "old_mode": 33188,
      "old_path": "odb/source.c",
      "new_id": "b25ef14df83ca84a5389e3399162387ffdbe5a05",
      "new_mode": 33188,
      "new_path": "odb/source.c"
    },
    {
      "type": "modify",
      "old_id": "9fd2b2e5b5267df21ca423b04e821bd1091db0ec",
      "old_mode": 33188,
      "old_path": "odb/source.h",
      "new_id": "6718aced6adcaa6c94832bd8f9aa9dc35e094f61",
      "new_mode": 33188,
      "new_path": "odb/source.h"
    },
    {
      "type": "modify",
      "old_id": "8f2143cab5d846e85db234d9461703d3f3e19f15",
      "old_mode": 33188,
      "old_path": "odb/streaming.c",
      "new_id": "5ac172beb65f04f95ad71f30e4bb950a16a2f117",
      "new_mode": 33188,
      "new_path": "odb/streaming.c"
    },
    {
      "type": "modify",
      "old_id": "f6f20088ec1fded6344ea3dbbbb669703e2e0556",
      "old_mode": 33188,
      "old_path": "odb/transaction.c",
      "new_id": "69824a3921d18f0b674de3715a4e9ff75545f17f",
      "new_mode": 33188,
      "new_path": "odb/transaction.c"
    },
    {
      "type": "modify",
      "old_id": "52556b454344e557c23dea0ee83035b1ff8921c4",
      "old_mode": 33188,
      "old_path": "pack-bitmap.c",
      "new_id": "d3c7997fb3c1cf07c3128eba243f90e38ff019d6",
      "new_mode": 33188,
      "new_path": "pack-bitmap.c"
    },
    {
      "type": "modify",
      "old_id": "93b69d7f502ae955a0727dc6cb3cce839dc2234b",
      "old_mode": 33188,
      "old_path": "packfile.c",
      "new_id": "ebe430662e1c1e714d5e9e02147bd4e48698d126",
      "new_mode": 33188,
      "new_path": "packfile.c"
    },
    {
      "type": "modify",
      "old_id": "fd1cf0ad6c5ae80959bc7748e8fc8133a8710020",
      "old_mode": 33188,
      "old_path": "packfile.h",
      "new_id": "ed3378c45761dd12534187edf6422a96323ea854",
      "new_mode": 33188,
      "new_path": "packfile.h"
    },
    {
      "type": "modify",
      "old_id": "c3a709a9284b7ff21703f487ac93e0eaf49f95b8",
      "old_mode": 33188,
      "old_path": "path.c",
      "new_id": "4608a56927a43ee2e515033af72878421f46de42",
      "new_mode": 33188,
      "new_path": "path.c"
    },
    {
      "type": "modify",
      "old_id": "d49dc11957c7a6b9a9ee9ba5cbca94e1780f1bcb",
      "old_mode": 33188,
      "old_path": "prune-packed.c",
      "new_id": "b6749b8d13233de6aa882feae706e09c5c48b343",
      "new_mode": 33188,
      "new_path": "prune-packed.c"
    },
    {
      "type": "modify",
      "old_id": "e20431690c96ba9e34685b089ff6a2da13e3c2d0",
      "old_mode": 33188,
      "old_path": "repack.c",
      "new_id": "53c34197f3a1c776b79b3b9fca8863f33ee67eb8",
      "new_mode": 33188,
      "new_path": "repack.c"
    },
    {
      "type": "modify",
      "old_id": "b857e1c580e83e3d7a37b42019dd272c0b1d9dd7",
      "old_mode": 33188,
      "old_path": "repository.c",
      "new_id": "fa4214ff413a0c7b642dc81451739296aa79d4a1",
      "new_mode": 33188,
      "new_path": "repository.c"
    },
    {
      "type": "modify",
      "old_id": "29474fc29238b3ff7d023970fc8417cf3d253d0a",
      "old_mode": 33188,
      "old_path": "setup.c",
      "new_id": "bc7d4519171f639c46c27e37f07544899077716e",
      "new_mode": 33188,
      "new_path": "setup.c"
    },
    {
      "type": "modify",
      "old_id": "a75c817e472c7aad86f31063fd8f3fdc12b999d8",
      "old_mode": 33188,
      "old_path": "t/helper/test-read-graph.c",
      "new_id": "62e2384052227078bec23b25ec801e938e8288bb",
      "new_mode": 33188,
      "new_path": "t/helper/test-read-graph.c"
    },
    {
      "type": "modify",
      "old_id": "2f2ffbbc7d06a6a215ada31b8ea48404135c965d",
      "old_mode": 33188,
      "old_path": "tmp-objdir.c",
      "new_id": "3debb60270f7b03a954f84e02f1ea9e7e79c1931",
      "new_mode": 33188,
      "new_path": "tmp-objdir.c"
    }
  ]
}
