)]}'
{
  "commit": "68cce04a028cac13fa1fd7a368801fac3d8b156b",
  "tree": "d9ccac4c502d75fcd2bf1dcf2a5a60995944f587",
  "parents": [
    "94f057755b7941b321fd11fec1b2e3ca5313a4e0"
  ],
  "author": {
    "name": "Toon Claes",
    "email": "toon@iotcl.com",
    "time": "Tue Jul 28 15:00:04 2026 +0200"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Tue Jul 28 11:07:19 2026 -0700"
  },
  "message": "merge: fix leak with merge.defaultToUpstream\n\nBy default the setting \u0027merge.defaultToUpstream\u0027 for git-merge(1) is set\nto \u0027true\u0027, which means when `git merge` is invoked with no arguments it\nmerges the upstream branch configured for the current branch.\n\nWith this configuration set to \u0027true\u0027, setup_with_upstream() is called.\nThat function allocates an array of arguments and hands it back to\ncmd_merge() via its `argv` parameter. This array is never freed, so\ncmd_merge() leaks it on every invocation.\n\nTrack the allocated array in a separate variable and free it at the end.\n\nThe leak has been present since 93e535a5b7 (merge: merge with the\ndefault upstream branch without argument, 2011-03-24). Although the leak\nsanitizer was enabled for tests in fc1ddf42af (t: remove\nTEST_PASSES_SANITIZE_LEAK annotations, 2024-11-21), it went unnoticed\nbecause no test calls `git merge` without arguments, exercising the\ndefault-to-upstream path. Add such a test in t7600, which fails under\nthe leak sanitizer without this fix.\n\nSigned-off-by: Toon Claes \u003ctoon@iotcl.com\u003e\nAcked-by: Jeff King \u003cpeff@peff.net\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2cbce56f8da9f7027cc95ad98540084b0ee98111",
      "old_mode": 33188,
      "old_path": "builtin/merge.c",
      "new_id": "ecd7a897d05fa9be0730cbacb170b0c76331dedd",
      "new_mode": 33188,
      "new_path": "builtin/merge.c"
    },
    {
      "type": "modify",
      "old_id": "9838094b66ac393e550eaabba7201ff987028a98",
      "old_mode": 33261,
      "old_path": "t/t7600-merge.sh",
      "new_id": "b3a2164e0836cd57b1ecf84aafcde9f8c5592e8a",
      "new_mode": 33261,
      "new_path": "t/t7600-merge.sh"
    }
  ]
}
