)]}'
{
  "commit": "d59ff393d718cd0ba209b23004178c21ce85a0a0",
  "tree": "1fbefb711caf6caa9d29aee0e9cd063a51acfc0c",
  "parents": [
    "e2d10556d0feec35395835becec7ac7aabd488b4"
  ],
  "author": {
    "name": "Miss Islington (bot)",
    "email": "31488909+miss-islington@users.noreply.github.com",
    "time": "Sat Oct 10 21:32:17 2026"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Sat Oct 10 21:32:17 2026"
  },
  "message": "[3.15] gh-123018: Keep the libedit history file header when truncating (GH-157165) (#157172)\n\ngh-123018: Keep the libedit history file header when truncating (GH-157165)\n\nlibedit\u0027s history_truncate_file() keeps the last N lines of the file,\nwhich drops the \"_HiStOrY_V2_\" header line that its own write_history()\nemits and that its read_history() requires.  So on a libedit build,\nreadline.write_history_file() or readline.append_history_file() after\nreadline.set_history_length() produced a file that\nreadline.read_history_file() rejected with EINVAL.\n\nUnder the libedit emulation, truncate the file ourselves and keep the\nheader, resolving the default \"~/.history\" the same way libedit does.\nApple\u0027s libedit fork already preserves the header, so the workaround is\nnot compiled on macOS.\n(cherry picked from commit 26387858990674f8cd20566f89c700fa1de5d829)\n\nCo-authored-by: Gregory P. Smith \u003c68491+gpshead@users.noreply.github.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "430996937bc21a2309a5efd1be5539d37536b15e",
      "old_mode": 33188,
      "old_path": "Lib/test/test_readline.py",
      "new_id": "11ebe00badc6d23f68d707bb26566c1d5635dbfc",
      "new_mode": 33188,
      "new_path": "Lib/test/test_readline.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d75aa6950eb0711d132f8aa05012b7a1d90386cd",
      "new_mode": 33188,
      "new_path": "Misc/NEWS.d/next/Library/2026-09-08-04-10-00.gh-issue-123018.hV2kQe.rst"
    },
    {
      "type": "modify",
      "old_id": "9d4904d0085b8e519de40c54da24d1244c37fd49",
      "old_mode": 33188,
      "old_path": "Modules/readline.c",
      "new_id": "fe00f889b536532f8a156cc2547aac08fce31b9f",
      "new_mode": 33188,
      "new_path": "Modules/readline.c"
    }
  ]
}
