)]}'
{
  "commit": "66c78e0653a4e60c625b8400da31da0ba5bd1286",
  "tree": "bae64a12e70c9537d7ce2eafd340de38bcb91e49",
  "parents": [
    "bb5c624209fcaebd60b9572b2cc8c61086e39b57"
  ],
  "author": {
    "name": "brian m. carlson",
    "email": "sandals@crustytoothpaste.net",
    "time": "Sat Nov 15 00:58:17 2025 +0000"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Sat Nov 15 11:51:37 2025 -0800"
  },
  "message": "object-file: disallow adding submodules of different hash algo\n\nThe design of the hash algorithm transition plan is that objects stored\nmust be entirely in one algorithm since we lack any way to indicate a\nmix of algorithms.  This also includes submodules, but we have\ntraditionally not enforced this, which leads to various problems when\ntrying to clone or check out the the submodule from the remote.\n\nSince this cannot work in the general case, restrict adding a submodule\nof a different algorithm to the index.  Add tests for git add and git\nsubmodule add that these are rejected.\n\nNote that we cannot check this in git fsck because the malformed\nsubmodule is stored in the tree as an object ID which is either\ntruncated (when a SHA-256 submodule is added to a SHA-1 repository) or\npadded with zeros (when a SHA-1 submodule is added to a SHA-256\nrepository).  We cannot detect even the latter case because someone\ncould have an actual submodule that actually ends in 24 zeros, which\nwould be a false positive.\n\nSigned-off-by: brian m. carlson \u003csandals@crustytoothpaste.net\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2bc36ab3ee8cbf2d83c4b3204a7c5df132b934d6",
      "old_mode": 33188,
      "old_path": "object-file.c",
      "new_id": "6ff6cf75499d30f55eabe0924fd6dd8fd9e2c7ab",
      "new_mode": 33188,
      "new_path": "object-file.c"
    },
    {
      "type": "modify",
      "old_id": "df580a5806b4f1ca245a861e473522ccc868d83a",
      "old_mode": 33261,
      "old_path": "t/t3700-add.sh",
      "new_id": "9a2c8dbcc23d9164066a05b5ecbbb3ec1ff44044",
      "new_mode": 33261,
      "new_path": "t/t3700-add.sh"
    },
    {
      "type": "modify",
      "old_id": "fd3e7e355e4ffca1cc6457d383458f8072aba053",
      "old_mode": 33261,
      "old_path": "t/t7400-submodule-basic.sh",
      "new_id": "e6b551daad7e58fe7a8bd48b362852a81cf81cae",
      "new_mode": 33261,
      "new_path": "t/t7400-submodule-basic.sh"
    }
  ]
}
