)]}'
{
  "commit": "ce1a5a22a5beefac8a52da518855b5aecc562874",
  "tree": "5f9c389be219f34b3ecd797ff4adf8b6744378bf",
  "parents": [
    "770afe443784b3ec2c72d68aa509e48064942348"
  ],
  "author": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Thu Nov 20 11:34:50 2025 -0800"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Mon Nov 24 17:00:47 2025 -0800"
  },
  "message": "config: really pretend missing :(optional) value is not there\n\nEarlier we added support for a value spelled as \":(optional)path\"\nfor configuration variables whose values are of type \"path\", with\nthe documented semantics \"if the path is missing, behave as if such\na variable definition is not even there.\"\n\nThis has worked OK for code paths that reads configuration files and\nstores the configured value as a string, where NULL in such a string\nis treated as if the setting is not there, left as the default.\n\nHowever, there are other code paths that do not _ignore_ such NULL\nvalues and misbehave.  \"git config get --path\" is one of them.\n\nWhen git_config_pathname() helper function finds that the value of\nthe variable is an optional path *and* the path is missing, it\nleaves the destination pointer intact (which usually is left to\nNULL) and returns 0 to signal a success.  format_config() helper\nhowever assumed that the destination pointer always gets a string,\nwhich no longer is the case, and segfaulted.\n\nMake sure that git_config_pathname() clears the destination pointer\nin such a case, and teach format_config() to react to the condition\nby returning 1 (which is different from 0 that is a normal success\nand negative that is an error) to its callers.  Adjust the callers\nto react to this new return value that tells them to pretend as if\nthey did not even see this partcular \u003ckey, value\u003e pair.\n\nReported-by: Han Jiang \u003cjhcarl0814@gmail.com\u003e\nHelped-by: Jeff King \u003cpeff@peff.net\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "59fb113b0739268e0602a76db66c63049ab88960",
      "old_mode": 33188,
      "old_path": "builtin/config.c",
      "new_id": "2b36eb7d1cd2045cbe8a65374e74861656f2bbd7",
      "new_mode": 33188,
      "new_path": "builtin/config.c"
    },
    {
      "type": "modify",
      "old_id": "6552e5b0b8020232fbc5dcd128794e9cfe2ab698",
      "old_mode": 33188,
      "old_path": "config.c",
      "new_id": "c6ef290011b752bb5b6c1ed3aea79e4360fdf646",
      "new_mode": 33188,
      "new_path": "config.c"
    },
    {
      "type": "modify",
      "old_id": "bbeba1a8d50e1bb2174e9548656a8f10f5c1fd9d",
      "old_mode": 33188,
      "old_path": "t/meson.build",
      "new_id": "137c0caea0e1b508445d45698b5a2752c5f2b18d",
      "new_mode": 33188,
      "new_path": "t/meson.build"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "fbbacfc67b368d1e85ef3614dad05896d3088c97",
      "new_mode": 33261,
      "new_path": "t/t1311-config-optional.sh"
    }
  ]
}
