)]}'
{
  "commit": "cb53d9309eb932e40fcdf3609eb050358ede2d17",
  "tree": "abf8d1ce9141777267dc7391380fb1a20b3168e5",
  "parents": [
    "7c52e9e9511ecbd3dad2d0de493ea7329a860c5f"
  ],
  "author": {
    "name": "Brad King",
    "email": "brad.king@kitware.com",
    "time": "Mon Nov 07 14:18:22 2022 -0500"
  },
  "committer": {
    "name": "Brad King",
    "email": "brad.king@kitware.com",
    "time": "Mon Nov 07 14:24:24 2022 -0500"
  },
  "message": "block: Fix variable scope protection from modification by subdirectories\n\nWhen `cmStateSnapshot::RaiseScope` raises a variable in to a parent\ndirectory scope, it uses `GetBuildsystemDirectoryParent` to find the\ncurrent top-most scope on the directory\u0027s stack.  Since commit 3f4e5e8c3d\n(cmState: Return end snapshot for GetBuildsystemDirectoryParent.,\n2015-09-01, v3.4.0-rc1~100^2~1), that depends on the `DirectoryEnd`\nfield in the directory\u0027s state.  However, when variable-only scopes were\nadded by commit 6954c8936f (cmState: Add a VariableScope snapshot type.,\n2015-08-01, v3.4.0-rc1~179^2~1), we neglected to account for the\naddition of that field by commit 52dbe654de (cmState: Record the end\nposition of each directory., 2015-08-01, v3.4.0-rc1~251^2~1).\n\nPrior to commit 44a2f3f332 (Add new flow-control commands for variables\nand policies scopes management, 2022-08-05, v3.25.0-rc1~257^2) this\nproblem went unnoticed because there was no way to have a variable scope\nat the top of a directory\u0027s stack while processing a subdirectory. Now\nthe `block()/endblock()` commands enable the behavior, so fix tracking\nof a variable scope as the top-most scope in a directory.\n\nFixes: #24138\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3d38e734af08b33f23c2881a16b71b12422f59f8",
      "old_mode": 33188,
      "old_path": "Source/cmState.cxx",
      "new_id": "869414b84c0708cf41904edde8fcc1865f347fa8",
      "new_mode": 33188,
      "new_path": "Source/cmState.cxx"
    },
    {
      "type": "modify",
      "old_id": "789b3d9d973f194c32c7d2bd28ab37dc52a4d15e",
      "old_mode": 33188,
      "old_path": "Tests/RunCMake/block/Scope-POLICIES.cmake",
      "new_id": "9536a997552aac33686008972cc63835be51aeaf",
      "new_mode": 33188,
      "new_path": "Tests/RunCMake/block/Scope-POLICIES.cmake"
    },
    {
      "type": "modify",
      "old_id": "140e63880f6868449c01eaad91ec1720ad5a78a5",
      "old_mode": 33188,
      "old_path": "Tests/RunCMake/block/Scope-VARIABLES.cmake",
      "new_id": "ac8da140c027b3f878223efb98f9eaefa15f0cc8",
      "new_mode": 33188,
      "new_path": "Tests/RunCMake/block/Scope-VARIABLES.cmake"
    },
    {
      "type": "modify",
      "old_id": "e1af50a2560380e66b5493c2ff30bc592136999d",
      "old_mode": 33188,
      "old_path": "Tests/RunCMake/block/Scope.cmake",
      "new_id": "ef43df6043a1c89a577531a0ba9052b828251d74",
      "new_mode": 33188,
      "new_path": "Tests/RunCMake/block/Scope.cmake"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "afd79e301b41e980f9e237709a55694c23727651",
      "new_mode": 33188,
      "new_path": "Tests/RunCMake/block/Scope/CMakeLists.txt"
    }
  ]
}
