)]}'
{
  "commit": "b67b2d9fb7ccfaa72446d76abc8c36849d2e0685",
  "tree": "acfcbe0dea8689107186519584c3392b2485c215",
  "parents": [
    "f8bdf3127ab7df8a8f3039f41889b35eefe029a3"
  ],
  "author": {
    "name": "Patrick Steinhardt",
    "email": "ps@pks.im",
    "time": "Wed Nov 19 08:50:53 2025 +0100"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Tue Nov 25 12:15:59 2025 -0800"
  },
  "message": "odb: move logic to disable ref updates into repo\n\nOur object database sources have a field `disable_ref_updates`. This\nfield can obviously be set to disable reference updates, but it is\nsomewhat curious that this logic is hosted by the object database.\n\nThe reason for this is that it was primarily added to keep us from\naccidentally updating references while an ODB transaction is ongoing.\nAny objects part of the transaction have not yet been committed to disk,\nso new references that point to them might get corrupted in case we\nnever end up committing the transaction. As such, whenever we create a\nnew transaction we set up a new temporary ODB source and mark it as\ndisabling reference updates.\n\nThis has one (and only one?) upside: once we have committed the\ntransaction, the temporary source will be dropped and thus we clean up\nthe disabled reference updates automatically. But other than that, it\u0027s\nsomewhat misdesigned:\n\n  - We can have multiple ODB sources, but only the currently active\n    source inhibits reference updates.\n\n  - We\u0027re mixing concerns of the refdb with the ODB.\n\nArguably, the decision of whether we can update references or not should\nbe handled by the refdb. But that wouldn\u0027t be a great fit either, as\nthere can be one refdb per worktree. So we\u0027d again have the same problem\nthat a \"global\" intent becomes localized to a specific instance.\n\nInstead, move the setting into the repository. While at it, convert it\ninto a boolean.\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": "29cf6496c5e50aff2e67b0cc81d08b97ae0b613f",
      "old_mode": 33188,
      "old_path": "odb.c",
      "new_id": "ccc6e999e7ae25d3d0d36379b94115cfdc731053",
      "new_mode": 33188,
      "new_path": "odb.c"
    },
    {
      "type": "modify",
      "old_id": "77b313b784cad38303ee4aecc0f2f6f1d3a9d7b7",
      "old_mode": 33188,
      "old_path": "odb.h",
      "new_id": "99c4d4897294597873461bbfd20bf9fcbb24dfa8",
      "new_mode": 33188,
      "new_path": "odb.h"
    },
    {
      "type": "modify",
      "old_id": "965381367e0e53914040d77bea12975354c8b854",
      "old_mode": 33188,
      "old_path": "refs.c",
      "new_id": "6c7283d9eb2aa89c354dd86497bf983f30994ed3",
      "new_mode": 33188,
      "new_path": "refs.c"
    },
    {
      "type": "modify",
      "old_id": "3c8b3813b00af00c30d1954ffd656744cfe5cfbb",
      "old_mode": 33188,
      "old_path": "repository.c",
      "new_id": "455c2d279fb8ab7cf0edb498f65576be4f95a4e0",
      "new_mode": 33188,
      "new_path": "repository.c"
    },
    {
      "type": "modify",
      "old_id": "5808a5d610846a0e42233f66e56dcbcebbd3ecd0",
      "old_mode": 33188,
      "old_path": "repository.h",
      "new_id": "614649413b68bc6d665c893cdc2dcf9a284e2321",
      "new_mode": 33188,
      "new_path": "repository.h"
    },
    {
      "type": "modify",
      "old_id": "8bf52df71663a350071a79f2e3ac60f9e94d663c",
      "old_mode": 33188,
      "old_path": "setup.c",
      "new_id": "a752e9fc8476a05e3550f4b69b5f70fd1488748d",
      "new_mode": 33188,
      "new_path": "setup.c"
    }
  ]
}
