)]}'
{
  "commit": "5004829756596498a20305b3fce8387629396835",
  "tree": "eeb0918a190fbee15480559bd8f00447820d918c",
  "parents": [
    "52bd2ff2741e376ab8b92c354ba64bdf9d1c2c0a"
  ],
  "author": {
    "name": "Chen Linxuan",
    "email": "me@black-desk.cn",
    "time": "Fri Jul 10 14:43:30 2026 +0800"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Fri Jul 10 08:19:15 2026 -0700"
  },
  "message": "config: add \"worktree\" and \"worktree/i\" includeIf conditions\n\nThe includeIf mechanism already supports matching on the .git\ndirectory path (gitdir) and the currently checked out branch\n(onbranch).  But in multi-worktree setups the .git directory of a\nlinked worktree points into the main repository\u0027s .git/worktrees/\narea, which makes gitdir patterns cumbersome when one wants to\ninclude config based on the working tree\u0027s checkout path instead.\n\nIntroduce two new condition keywords:\n\n  - worktree:\u003cpattern\u003e matches the realpath of the current worktree\u0027s\n    working directory (i.e. repo_get_work_tree()) against a glob\n    pattern.  This is the path returned by git rev-parse\n    --show-toplevel.\n\n  - worktree/i:\u003cpattern\u003e is the case-insensitive variant.\n\nThe implementation reuses the include_by_path() helper introduced in\nthe previous commit, passing the worktree path in place of the\ngitdir.  The condition never matches in bare repositories (where\nthere is no worktree) or during early config reading (where no\nrepository is available).\n\nAdd documentation describing the new conditions, including a comparison\nwith extensions.worktreeConfig and a note that worktree matching currently\nuses the realpath-resolved worktree location.  Add tests covering bare\nrepositories, multiple worktrees, realpath-resolved symlinked worktree\npaths, case-sensitive and case-insensitive matching, early config reading,\nand non-repository scenarios.\n\nSigned-off-by: Chen Linxuan \u003cme@black-desk.cn\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "15b1a4d593475883ef4318c63dff39da38cf98dc",
      "old_mode": 33188,
      "old_path": "Documentation/config.adoc",
      "new_id": "1ef72de62f2ba6e8c80ae3baaef6127d3563f4f1",
      "new_mode": 33188,
      "new_path": "Documentation/config.adoc"
    },
    {
      "type": "modify",
      "old_id": "00eeeea370c962cec6c9c66b27f4a838e4f6df21",
      "old_mode": 33188,
      "old_path": "config.c",
      "new_id": "9d6d7872d76c10e303b1778de1cd691f7baee5a5",
      "new_mode": 33188,
      "new_path": "config.c"
    },
    {
      "type": "modify",
      "old_id": "f3892578e4ff866fe78250038fd99525c24861d4",
      "old_mode": 33261,
      "old_path": "t/t1305-config-include.sh",
      "new_id": "4e840dfdb35be43644cd80e6d0c2934f58e1c292",
      "new_mode": 33261,
      "new_path": "t/t1305-config-include.sh"
    }
  ]
}
