)]}'
{
  "commit": "20073e7ae60c362bc3ba2677f27dd104cf34ff24",
  "tree": "1aec6bc3c4584793563edc04b0a74b854f0c8628",
  "parents": [
    "3824c8d9dde3dc7c9db0f7dcdd08ee21a759dd57"
  ],
  "author": {
    "name": "Nico Huber",
    "email": "nico.h@gmx.de",
    "time": "Fri May 10 01:31:40 2024 +0200"
  },
  "committer": {
    "name": "Nico Huber",
    "email": "nico.h@gmx.de",
    "time": "Sun Jul 07 19:37:52 2024 +0000"
  },
  "message": "Properly clear erase-block selection when bigger block is chosen\n\nWhen we choose to erase a bigger block over many smaller sub blocks,\nwe should clear the `selected\u0027 status  of sub blocks recursively. If\nnot, we risk to miss sub blocks that haven\u0027t been consolidated in an\nintermediate level of erase blocks.\n\nFor instance, considering a flash chip with three erase functions:\n\n    32x   4KiB sectors\n     4x  32KiB blocks\n     1x 128KiB chip\n\nWith the following erase pattern at the lowest, 4KiB level (`x\u0027 for\na block that is selected for erase, `.\u0027 for one left untouched):\n\n    xxx..xxx ..x..x.. xxxxxxxx x.x.....    4KiB\n\nAt the intermediate level, we would consolidate those 32KiB blocks\nthat get more than half of their sub blocks erased:\n\n    ........ ..x..x.. ........ x.x.....    4KiB\n        x        .        x        .      32KiB\n\nStill more than half of the flash gets erased, so we would consoli-\ndate this to a full chip erase:\n\n    ........ ........ ........ ........    4KiB\n        .        .        .        .      32KiB\n                     x                   128KiB\n\nThe current implementation, however, wouldn\u0027t clear the remaining\nselected blocks at the 4KiB level.\n\nChange-Id: I90181f9c53ca9aa06d353ba6dd4072efbebc260c\nSigned-off-by: Nico Huber \u003cnico.h@gmx.de\u003e\nReviewed-on: https://review.sourcearcade.org/c/flashprog/+/161\nReviewed-by: Angel Pons \u003cth3fanbus@gmail.com\u003e\nReviewed-by: Arthur Heymans \u003carthur@aheymans.xyz\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "859537b59f9d0e1c3be11dbca0955fea319d146f",
      "old_mode": 33188,
      "old_path": "flashprog.c",
      "new_id": "704fd2e26300d3f0393048d043da51c2b014d0fb",
      "new_mode": 33188,
      "new_path": "flashprog.c"
    }
  ]
}
