)]}'
{
  "commit": "b6f17686b20647fc904e6201fa6d168731e588eb",
  "tree": "327606fe67ef96c775286116c631819235444808",
  "parents": [
    "16abad336073665c13c09b1026dd1227688b9c10"
  ],
  "author": {
    "name": "Yannik Tausch",
    "email": "dev@ytausch.de",
    "time": "Mon Sep 14 09:27:05 2026 +0200"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Mon Sep 14 07:57:47 2026 -0700"
  },
  "message": "dir: preserve pathspec prefix optimization with leading excludes\n\nDirectory walks use the common directory prefix of non-exclude\npathspec items to avoid scanning unrelated portions of the working\ntree or index. Exclude items only remove paths from that candidate\nset, so they do not need to widen the traversal.\n\nWhen an exclude item is the first pathspec item, common_prefix_len()\nfails to establish a comparison base and returns a zero-length prefix.\nThe result is correct, but Git unnecessarily traverses from a broader\nstarting point even when all non-exclude items share a directory.\n\nUse the first non-exclude item as the comparison base and return its\nstring together with the prefix length, allowing callers to start from\nthe recovered directory prefix. Exclude matching continues to use full\npaths, so this restores the optimization without changing which paths\nare selected. Add a unit test covering an exclude item before two\nnon-exclude items with a common directory.\n\nSigned-off-by: Yannik Tausch \u003cdev@ytausch.de\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5f42c992d37cbad348571891de2ea2ef9034ed7f",
      "old_mode": 33188,
      "old_path": "dir.c",
      "new_id": "abc4a78f31f2e76ddee5166bf8d5d5a23bf7b349",
      "new_mode": 33188,
      "new_path": "dir.c"
    },
    {
      "type": "modify",
      "old_id": "2d0adaa39ed3d2ff5386ba70128ad8bcc02826a6",
      "old_mode": 33188,
      "old_path": "t/unit-tests/u-dir.c",
      "new_id": "a3442c3d3c412145d25ad96a020c80d45ba1fae5",
      "new_mode": 33188,
      "new_path": "t/unit-tests/u-dir.c"
    }
  ]
}
