)]}'
{
  "commit": "5008bde9900db114f106e3262108ce726b879a11",
  "tree": "7b69b8701328aab3e465ba016dab98d1cac56096",
  "parents": [
    "4ddd9f289debef7878f737b05de9a56989152b33"
  ],
  "author": {
    "name": "Kristoffer Haugsbakk",
    "email": "code@khaugsbakk.name",
    "time": "Sun Oct 04 19:58:35 2026 +0200"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Sun Oct 04 14:24:27 2026 -0700"
  },
  "message": "format-patch: learn --[no-]range-diff-notes\n\ngit-format-patch(1) passes on the notes behavior that it is using for\nthe patches to git-range-diff(1). In turn you get the same Git notes\ndisplayed in the range diff as the ones you used to generate the\npatches. And that makes sense in most cases.\n\nHowever, I often make notes between series versions that mostly prepend\nto the original. They end up looking like this:\n\n    v3:\n    [desc.]\n    v2:\n    [descr.]\n    v1:\n    [descr.]\n\nThese notes are meant for the git-format-patch(1) output since they\ndocument the iterations. But including them also includes them in the\nrange diff. And they have nothing useful to say there.\n\nLet’s teach git-format-patch(1) `--[no-]range-diff-notes` so that we\ncan pass in different notes refs to the range diff, or just turn them\noff entirely.\n\nIn addition to storing the list of notes, we also need a boolean\n`override` to distinguish these two cases:\n\n1. No such options were given and empty list (use `--notes`)\n2. Options were given and empty list (`--no-...` given; don’t use notes)\n\nUnlike `--creation-factor`, `--[no-]range-diff-notes` does not error out\nwhen used without `--range-diff`. This flexibility accommodates\nworkflows where users might configure default options in aliases or\nwrapper scripts, allowing `--range-diff` to be toggled independently.\n\nAdd two tests here for the single-patch case, i.e. the case where the\nrange diff is on the patch and not in the cover letter. These are meant\nas regression tests based on my encounter with single-patch range diff\nnotes handling bug.[1]\n\n† 1: 155986b4 (format-patch: handle range-diff on notes correctly for\n     single patches, 2025-09-25)\n\nHelped-by: Junio C Hamano \u003cgitster@pobox.com\u003e\nSigned-off-by: Kristoffer Haugsbakk \u003ccode@khaugsbakk.name\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "191f64b77d17586a10b5fad69ad57995a02043aa",
      "old_mode": 33188,
      "old_path": "Documentation/git-format-patch.adoc",
      "new_id": "2399ba244543e2668078da1b5bf43c39fbb7164e",
      "new_mode": 33188,
      "new_path": "Documentation/git-format-patch.adoc"
    },
    {
      "type": "modify",
      "old_id": "560af00e2fdc6c4e5c8f3cbe74a30b66da293234",
      "old_mode": 33188,
      "old_path": "builtin/log.c",
      "new_id": "445400ba782573c6b66b08db35929b3de6d8c4a4",
      "new_mode": 33188,
      "new_path": "builtin/log.c"
    },
    {
      "type": "modify",
      "old_id": "ef92704de3983063473cb0d0d167243acedb928b",
      "old_mode": 33261,
      "old_path": "t/t3206-range-diff.sh",
      "new_id": "679a707c873d4981a7529dd6e1ae588e9ef7c65c",
      "new_mode": 33261,
      "new_path": "t/t3206-range-diff.sh"
    }
  ]
}
