)]}'
{
  "commit": "1940a02dc1122d15706a7051ee47e73f329fb4f7",
  "tree": "3eeefa87a376d9384089b49825af1de4499d20d4",
  "parents": [
    "9d6c580d01800defbd9497dbe6a694dc31179dce"
  ],
  "author": {
    "name": "Jeff King",
    "email": "peff@peff.net",
    "time": "Sun Oct 26 11:42:22 2025 -0400"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Sun Oct 26 16:32:43 2025 -0700"
  },
  "message": "match_pathname(): give fnmatch one char of prefix context\n\nIn match_pathname(), which we use for matching .gitignore and\n.gitattribute patterns, we are comparing paths with fnmatch patterns\n(actually our extended wildmatch, which will be important).  There\u0027s an\nextra optimization there: we pre-compute the number of non-wildcard\ncharacters at the beginning of the pattern and do an fspathncmp() on\nthat prefix.\n\nThat lets us avoid fnmatch entirely on patterns without wildcards, and\nshrinks the amount of work we hand off to fnmatch. For a pattern like\n\"foo*.txt\" and a path \"foobar.txt\", we\u0027d cut away the matching \"foo\"\nprefix and just pass \"*.txt\" and \"bar.txt\" to fnmatch().\n\nBut this misses a subtle corner case. In fnmatch(), we\u0027ll think\n\"bar.txt\" is the start of the path, but it\u0027s not. This doesn\u0027t matter\nfor the pattern above, but consider the wildmatch pattern \"foo**/bar\"\nand the path \"foobar\". These two should not match, because there is no\nfile named \"bar\", and the \"**\" applies only to the containing directory\nname. But after removing the \"foo\" prefix, fnmatch will get \"**/bar\" and\n\"bar\", which it does consider a match, because \"**/\" can match zero\ndirectories.\n\nWe can solve this by giving fnmatch a bit more context. As long as it\nhas one byte of the matched prefix, then it will know that \"bar\" is not\nthe start of the path. In this example it would get \"o**/bar\" and\n\"obar\", and realize that they cannot match.\n\nSigned-off-by: Jeff King \u003cpeff@peff.net\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "130fa987660a01cbefb373bb06b6379ad4d01e1d",
      "old_mode": 33188,
      "old_path": "dir.c",
      "new_id": "465c22ff68f14fd25ae8f3585cc774a3c148ddd1",
      "new_mode": 33188,
      "new_path": "dir.c"
    },
    {
      "type": "modify",
      "old_id": "273d71411fe05d132467437498463a0d765da205",
      "old_mode": 33261,
      "old_path": "t/t0008-ignores.sh",
      "new_id": "db8bde280ecfc9b3d3cc9dff0e1d794471342586",
      "new_mode": 33261,
      "new_path": "t/t0008-ignores.sh"
    }
  ]
}
