)]}'
{
  "commit": "2e8a9d94b009c69628e29bc7c50d9a3fc12e14ba",
  "tree": "16196e765cd3474c0120bfc5b09c90586ea2a30e",
  "parents": [
    "a6de316efde124a132d38e50c6407477df47f9cd"
  ],
  "author": {
    "name": "René Scharfe",
    "email": "l.s.r@web.de",
    "time": "Tue Aug 25 20:03:50 2026 +0200"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Wed Aug 26 09:03:34 2026 -0700"
  },
  "message": "worktree add: let worktree_basename() return string copy\n\nworktree_basename() requires callers to do pointer arithmetic to get the\nactual basename.  Simplify them by doing the calculations in the\nfunction and returning a copy of the basename directly.\n\nRemind programmers to free the result by renaming the function to\nworktree_basename_dup().  Among the three callers of the original\nfunction, two immediately make copies of the returned string before\nusing and freeing it, which makes for an easy conversion.  Convert\nthe other one from resetting a shared strbuf to freeing the\nallocated string, which requires the same number of lines, but no\narithmetic.  The added allocation is negligible because it\u0027s small\nand there\u0027s only one per run of \"git worktree add\".\n\nSigned-off-by: René Scharfe \u003cl.s.r@web.de\u003e\n[jc: rephrased the second paragraph a bit.]\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e5b7d6f5ec623b9cbcec7d96249561a69ff3b1a8",
      "old_mode": 33188,
      "old_path": "builtin/worktree.c",
      "new_id": "e5a4196f7f501c7c724e3e505a000d6b054458c8",
      "new_mode": 33188,
      "new_path": "builtin/worktree.c"
    }
  ]
}
