)]}'
{
  "commit": "dd8e8c786efdfb3ba588d807bfb0dc0d5196c343",
  "tree": "9a748dd74255dcbc30ec68992dbd5de1cde014d3",
  "parents": [
    "bb5c624209fcaebd60b9572b2cc8c61086e39b57"
  ],
  "author": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Sat Nov 15 23:02:57 2025 -0800"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Tue Nov 25 08:43:20 2025 -0800"
  },
  "message": "submodule add: sanity check existing .gitmodules\n\n\"git submodule add\" tries to find if a submodule with the same name\nalready exists at a different path, by looking up an entry in the\n.gitmodules file.  If the entry in the file is incomplete, e.g.,\nwhen the submodule.\u003cname\u003e.something variable is defined but there is\nno definition of submodule.\u003cname\u003e.path variable, it accesses the\nmissing .path member of the submodule structure and triggers a\nsegfault.\n\nA brief audit was done to make sure that the code does not assume\nmembers other than those that are absolutely certain to exist: a\nsubmodule obtained by submodule_from_name() should have .name\nmember, while a submodule obtained by submodule_from_path() should\nalso have .path as well as .name member, and we cannot assume\nanything else.  Luckily, the module_add() codepath was the only\nproblematic one.  It is fairly recent code that comes from 1fa06ced\n(submodule: prevent overwriting .gitmodules on path reuse,\n2025-07-24).\n\nA helper used by update_submodule() seems to assume that its call to\nsubmodule_from_path() always yields a submodule object without a\nfailure, which seems to rely on the caller making sure it is the\ncase.  Leave an assert() with a NEEDSWORK comment there for future\ndevelopers to make sure the assumption actually holds.\n\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "07a1935cbe1a69d813402430967213d03ab8a128",
      "old_mode": 33188,
      "old_path": "builtin/submodule--helper.c",
      "new_id": "1a1043cdab73afe3a51a5f17a571ff2870775e28",
      "new_mode": 33188,
      "new_path": "builtin/submodule--helper.c"
    },
    {
      "type": "modify",
      "old_id": "fd3e7e355e4ffca1cc6457d383458f8072aba053",
      "old_mode": 33261,
      "old_path": "t/t7400-submodule-basic.sh",
      "new_id": "9ade97e432162aa2eb914b72599ecf22c35d0783",
      "new_mode": 33261,
      "new_path": "t/t7400-submodule-basic.sh"
    }
  ]
}
