)]}'
{
  "commit": "7b2a5c2f9a52c4a08630fa741052f03fe5d3cc8a",
  "tree": "30675534061aa56e73166eadfd0ebad57113a16b",
  "parents": [
    "d220fbcd1db2097de5ff3037e85317fcb5433e4e"
  ],
  "author": {
    "name": "Eric Blake",
    "email": "eblake@redhat.com",
    "time": "Tue Sep 29 16:21:04 2015 -0600"
  },
  "committer": {
    "name": "Markus Armbruster",
    "email": "armbru@redhat.com",
    "time": "Mon Oct 12 18:44:54 2015 +0200"
  },
  "message": "qapi: Avoid assertion failure on union \u0027type\u0027 collision\n\nThe previous commit added two tests that triggered an assertion\nfailure. It\u0027s fairly straightforward to avoid the failure by\njust outright forbidding the collision between a union\u0027s tag\nvalues and its discriminator name (including the implicit name\n\u0027kind\u0027 supplied for simple unions [*]).  Ultimately, we\u0027d like\nto move the collision detection into QAPISchema*.check(), but\nfor now it is easier just to enhance the existing checks.\n\n[*] Of course, down the road, we have plans to rename the simple\nunion tag name to \u0027type\u0027 to match the QMP wire name, but the\nidea of the collision will still be present even then.\n\nTechnically, we could avoid the collision by naming the C union\nmembers representing each enum value as \u0027_case_value\u0027 rather\nthan \u0027value\u0027; but until we have an actual qapi client (and not\njust our testsuite) that has a legitimate reason to match a\ncase label to the name of a QMP key and needs the name munging\nto satisfy the compiler, it\u0027s easier to just reject the qapi\nas invalid.\n\nSigned-off-by: Eric Blake \u003ceblake@redhat.com\u003e\nMessage-Id: \u003c1443565276-4535-7-git-send-email-eblake@redhat.com\u003e\n[Polished a few comments]\nSigned-off-by: Markus Armbruster \u003carmbru@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4b5d574e0d62bbb4ebdf162bb14532938f12a9eb",
      "old_mode": 33188,
      "old_path": "scripts/qapi.py",
      "new_id": "8d2681b24bb79432da9337de20465fb4468a21b2",
      "new_mode": 33188,
      "new_path": "scripts/qapi.py"
    },
    {
      "type": "modify",
      "old_id": "6e64d1d81953af7c81c93aa59ac1ddb76ca24aea",
      "old_mode": 33188,
      "old_path": "tests/qapi-schema/flat-union-clash-type.err",
      "new_id": "b44dd4005c9974181d7ea40183ac136b2bac2185",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/flat-union-clash-type.err"
    },
    {
      "type": "modify",
      "old_id": "3db6ea07a8d815b1900003ae6c6778a7dd1e4428",
      "old_mode": 33188,
      "old_path": "tests/qapi-schema/flat-union-clash-type.json",
      "new_id": "8f710f08aa870056e8e77172df42f4a4650d4318",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/flat-union-clash-type.json"
    },
    {
      "type": "modify",
      "old_id": "6e64d1d81953af7c81c93aa59ac1ddb76ca24aea",
      "old_mode": 33188,
      "old_path": "tests/qapi-schema/union-clash-type.err",
      "new_id": "a5dead128d578dc85fcd87e3cf9fd0fccb0b676e",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/union-clash-type.err"
    },
    {
      "type": "modify",
      "old_id": "52c21f77ea67c160cc179bc1c5efd33b1fefcef8",
      "old_mode": 33188,
      "old_path": "tests/qapi-schema/union-clash-type.json",
      "new_id": "cfc256b04d39e87527a6cb39407bf67a3f6cdc8f",
      "new_mode": 33188,
      "new_path": "tests/qapi-schema/union-clash-type.json"
    }
  ]
}
