)]}'
{
  "commit": "dd674df3267112248b0012ce614168055a416920",
  "tree": "7a6068af5ace33d82ad0684e26d67551a8e38f11",
  "parents": [
    "e9019fcafe0040228b8631c30f97ae1adb61bcdc"
  ],
  "author": {
    "name": "Ted Nyman",
    "email": "tnyman@openai.com",
    "time": "Mon Jul 20 15:31:20 2026 -0700"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Tue Jul 21 10:33:14 2026 -0700"
  },
  "message": "pathspec: use match for sparse-index expansion checks\n\nThe pathspec parser computes `len` and `nowildcard_len` from\n`item.match`, which includes any prefix added when a command is run\nfrom a subdirectory. `item.original` can still contain the shorter,\nunprefixed argument.\n\nUsing `item.original + item.nowildcard_len` in\n`pathspec_needs_expanded_index()` can therefore read past the end of\nthe allocation. AddressSanitizer reports a heap-buffer-overflow for\nprefixed wildcard pathspecs passed to `git rm` and `git reset` with a\nsparse index.\n\nThe mismatch dates back to 4d1cfc1351 (\"reset: make --mixed\nsparse-aware\", 2021-11-29), which introduced the helper using\n`item.original`. b29ad38322 (\"pathspec.h: move\npathspec_needs_expanded_index() from reset.c to here\", 2022-08-07)\nlater moved it to `pathspec.c` and preserved the affected comparisons.\n\nUse `item.match` consistently when checking whether a pathspec can\nmatch a sparse-directory entry. Add coverage for prefixed wildcard\npathspecs so both commands keep the index sparse.\n\nSigned-off-by: Ted Nyman \u003ctnyman@openai.com\u003e\nReviewed-by: Taylor Blau \u003cttaylorr@openai.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f78b22709ccb673873d636b1b08f412c18a5f435",
      "old_mode": 33188,
      "old_path": "pathspec.c",
      "new_id": "281858f21f9c59839b707e04a2f2ee113389b2a3",
      "new_mode": 33188,
      "new_path": "pathspec.c"
    },
    {
      "type": "modify",
      "old_id": "8186da5c887c56301fb0b2a3ec731b99091bdec9",
      "old_mode": 33261,
      "old_path": "t/t1092-sparse-checkout-compatibility.sh",
      "new_id": "d4a9c0bbf2d0fdc8fdcdc814b27acd3b7aa5ecbe",
      "new_mode": 33261,
      "new_path": "t/t1092-sparse-checkout-compatibility.sh"
    }
  ]
}
