)]}'
{
  "commit": "b54d5e19f068a73bdbde5a9434fe72902764b958",
  "tree": "d4de6e76d1d85e4bf81f068a965e2316c6bed233",
  "parents": [
    "fb60c49d18d1d52b6b81680586754168bc3ebc2c"
  ],
  "author": {
    "name": "Pablo Sabater",
    "email": "pabloosabaterr@gmail.com",
    "time": "Fri Jul 24 12:54:15 2026 +0200"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Fri Jul 24 08:46:58 2026 -0700"
  },
  "message": "fetch-pack: drop the static advertise_sid variable\n\nwrite_fetch_command_and_capabilities() is moved to \u0027connect.c\u0027 in a\nsubsequent commit. To prepare for that, drop the static variable usage\nof advertise_sid.\n\nCurrently advertise_sid is set in fetch_pack_config() by reading\n\"transfer.advertisesid\". It is used in three places:\n\n1. In do_fetch_pack(), to clear it when the server lacks support:\n\n        if (!server_supports(\"session-id\"))\n               advertise_sid \u003d 0;\n\n2. In find_common(), to advertise the session id over protocol v0/v1:\n\n        if (advertise_sid)\n                strbuf_addf(\u0026c, \" session-id\u003d%s\", trace2_session_id());\n\n3. In write_fetch_command_and_capabilities(), to advertise it over\n   protocol v2:\n\n        if (advertise_sid \u0026\u0026 server_supports_v2(\"session-id\"))\n                packet_buf_write(req_buf, \"session-id\u003d%s\", trace2_session_id());\n\nAbout 1, the check only guards the v0/v1 path, and the v2 path\nalready checks server support inline in its condition. Follow the\nsame pattern and fold the check into the condition in find_common().\n\nAbout 2 and 3, replace the static variable with a local read via\nrepo_config_get_bool() in each function.\n\nBecause repo_config_get_bool() leaves advertise_sid as is if it is not\nset, initialize it to 0, matching its default.\n\nHelped-by: Jonathan Tan \u003cjonathantanmy@google.com\u003e\nHelped-by: Christian Couder \u003cchriscool@tuxfamily.org\u003e\nSigned-off-by: Calvin Wan \u003ccalvinwan@google.com\u003e\nSigned-off-by: Eric Ju \u003ceric.peijian@gmail.com\u003e\nSigned-off-by: Pablo Sabater \u003cpabloosabaterr@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9eb8fc539986b7bd6e1fd03ad3e3291fbdaf373c",
      "old_mode": 33188,
      "old_path": "fetch-pack.c",
      "new_id": "65ebfec09fc62df11846d7be1a8740262e48b2b4",
      "new_mode": 33188,
      "new_path": "fetch-pack.c"
    }
  ]
}
