)]}'
{
  "commit": "edd9757d2d805b9cdaa4e3ad65cfde2df01eaab3",
  "tree": "a672d1d4918ab3a83d692baa4f819028409c6fd6",
  "parents": [
    "078b46549f7a2d90e408dd2ad99587876f48e66a"
  ],
  "author": {
    "name": "Fabiano Rosas",
    "email": "farosas@suse.de",
    "time": "Mon Sep 14 21:01:53 2026 -0300"
  },
  "committer": {
    "name": "Fabiano Rosas",
    "email": "farosas@suse.de",
    "time": "Fri Sep 25 11:29:13 2026 -0300"
  },
  "message": "migration: Merge parameter structs instead of assigning one by one\n\nConvert the code in migrate_params_test_apply() from an open-coded\ncopy of every migration parameter to a merge operation using QAPI\nvisitors and QDict.\n\nThe purpose of that routine is to update a temporary structure\n(pre-populated with the current migration parameters), with the values\nreceived from the user via QAPI. As a result, the temporary structure\nwill then contain the \"to be applied\" parameters and it\u0027s validated\nbefore being used to overwrite the parameters currently in use.\n\nThe update is currently done as follows:\n\nwhere \u0027params\u0027 is the user input from QAPI,\nfor each parameter:\n\n  a) check if the option is present\n     params-\u003ehas_\u003cname\u003e \u003d\u003d true\n     params-\u003e\u003cname\u003e !\u003d NULL // for strings\n\n  b) if the parameter is a pointer, free the to-be-assigned member and\n     allocate memory for the copy from params\n\n  c) assign the user provided value to the temporary structure.\n\nStep (a) is the same in principle as what the QAPI visitors do at\nvisit_type_MigrationParameters_members().\n\nSteps (b) and (c) are roughly the same as what the QDict\nimplementation does when qdict_del() and qdict_put_obj() are combined.\n\nTherefore, replace the open-coded function with\nmigrate_params_merge(), which achieves the same goal, but uses\nvisitors and QDict. This hides the details of QAPI (has_*) from the\nmigration code and avoids the need to update\nmigrate_params_test_apply() every time a new migration parameter is\nadded.\n\nReviewed-by: Peter Xu \u003cpeterx@redhat.com\u003e\nSigned-off-by: Fabiano Rosas \u003cfarosas@suse.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ac7e94ed6223502075f769a78b962999d45cc02a",
      "old_mode": 33188,
      "old_path": "migration/options.c",
      "new_id": "0f7478aa6a58ac17bd33a171a9f69be8072ff19c",
      "new_mode": 33188,
      "new_path": "migration/options.c"
    }
  ]
}
