)]}'
{
  "commit": "8277d2aa58fe4f8f3ee394ea647ea652faf822a4",
  "tree": "fbbde8c5f68714997853f8660136d8c2efec740d",
  "parents": [
    "73eaa04777001e6d68181910ed36729528f77d74"
  ],
  "author": {
    "name": "Markus Armbruster",
    "email": "armbru@redhat.com",
    "time": "Fri Dec 18 16:35:12 2015 +0100"
  },
  "committer": {
    "name": "Markus Armbruster",
    "email": "armbru@redhat.com",
    "time": "Wed Jan 13 15:16:17 2016 +0100"
  },
  "message": "error: New error_prepend(), error_reportf_err()\n\nInstead of simply propagating an error verbatim, we sometimes want to\nadd to its message, like this:\n\n    frobnicate(arg, \u0026err);\n    error_setg(errp, \"Can\u0027t frobnicate %s: %s\",\n                     arg, error_get_pretty(err));\n    error_free(err);\n\nThis is suboptimal, because it loses err\u0027s hint (if any).  Moreover,\nwhen errp is \u0026error_abort or is subsequently propagated to\n\u0026error_abort, the abort message points to the place where we last\nadded to the error, not to the place where it originated.\n\nTo avoid these issues, provide means to add to an error\u0027s message in\nplace:\n\n    frobnicate(arg, errp);\n    error_prepend(errp, \"Can\u0027t frobnicate %s: \", arg);\n\nLikewise, reporting an error like\n\n    frobnicate(arg, \u0026err);\n    error_report(\"Can\u0027t frobnicate %s: %s\", arg, error_get_pretty(err));\n\ncan lose err\u0027s hint.  To avoid:\n\n    error_reportf_err(err, \"Can\u0027t frobnicate %s: \", arg);\n\nThe next commits will put these functions to use.\n\nSigned-off-by: Markus Armbruster \u003carmbru@redhat.com\u003e\nReviewed-by: Eric Blake \u003ceblake@redhat.com\u003e\nMessage-Id: \u003c1450452927-8346-10-git-send-email-armbru@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b18a608c6d47114bb6a54e333f3c427036898a12",
      "old_mode": 33188,
      "old_path": "include/qapi/error.h",
      "new_id": "45d6c72dee6d7b4d679670792da1bccd41570e5b",
      "new_mode": 33188,
      "new_path": "include/qapi/error.h"
    },
    {
      "type": "modify",
      "old_id": "ebfb74b02e755e0e72703db7ad36d69e22294248",
      "old_mode": 33188,
      "old_path": "util/error.c",
      "new_id": "57303fd05c0c2f18ec240efa930e0f930358ac75",
      "new_mode": 33188,
      "new_path": "util/error.c"
    }
  ]
}
