)]}'
{
  "commit": "1be6ebe264031dc2175fec50c36df25fafd25084",
  "tree": "d6a5e5d0f93057d51477d81151660d9a0ce15ddc",
  "parents": [
    "dd674df3267112248b0012ce614168055a416920"
  ],
  "author": {
    "name": "Ted Nyman",
    "email": "tnyman@openai.com",
    "time": "Mon Jul 20 15:31:21 2026 -0700"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Tue Jul 21 10:33:25 2026 -0700"
  },
  "message": "stash: avoid sparse-index expansion for in-cone paths\n\n`git stash push -- \u003cpathspec\u003e` expands a sparse index before checking\nwhether the pathspec matches any tracked paths. This is unnecessary\nwhen the pathspec is wholly inside the sparse-checkout cone and makes\na path-limited stash proportional to the size of the full index.\n\nUse `pathspec_needs_expanded_index()` to expand only when a pathspec\ncan match part of a sparse-directory entry, as `git rm` and `git\nreset` already do. Keep the full-index behavior for pathspecs that\nneed it.\n\nAdd compatibility coverage for literal, prefixed, wildcard, file,\nmultiple, staged, and missing pathspecs. Add the corresponding\npath-limited stash case to p2000.\n\nOn a cone-mode repository with 349,525 tracked paths and 49 sparse\nindex entries, the best of three runs changed from 18.87s to 0.06s.\nTrace2 reported four index expansions before this change and none\nafter it.\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": "c4809f299a313bf2ad20eacbf196e5f76a18b8a0",
      "old_mode": 33188,
      "old_path": "builtin/stash.c",
      "new_id": "72c52571f8c06cd9812359ae5778fdb1dd930856",
      "new_mode": 33188,
      "new_path": "builtin/stash.c"
    },
    {
      "type": "modify",
      "old_id": "aadf22bc2f0bb29f0dfe390d5554a1901337f98d",
      "old_mode": 33261,
      "old_path": "t/perf/p2000-sparse-operations.sh",
      "new_id": "548a61cd9064bc0077b07f12e2771bc9568e8400",
      "new_mode": 33261,
      "new_path": "t/perf/p2000-sparse-operations.sh"
    },
    {
      "type": "modify",
      "old_id": "d4a9c0bbf2d0fdc8fdcdc814b27acd3b7aa5ecbe",
      "old_mode": 33261,
      "old_path": "t/t1092-sparse-checkout-compatibility.sh",
      "new_id": "c3f7bfe551a247119a36a60025ae8c18f974b1c7",
      "new_mode": 33261,
      "new_path": "t/t1092-sparse-checkout-compatibility.sh"
    }
  ]
}
