)]}'
{
  "commit": "921936652359fe72728eb196aa9107310f02a4d4",
  "tree": "76bfc9865bc9ee26e4f73999bcecf424dd649598",
  "parents": [
    "41de629c1fe88f9ea95d0400af6896f3c84a0dff"
  ],
  "author": {
    "name": "Paul Jakma",
    "email": "paul.jakma@hpe.com",
    "time": "Thu Jun 16 15:53:26 2016 +0100"
  },
  "committer": {
    "name": "Paul Jakma",
    "email": "paul.jakma@hpe.com",
    "time": "Tue Sep 13 10:36:36 2016 +0100"
  },
  "message": "lib: keep hash of node\u0027s commands to detect duplicate installs\n\n* command.h: (struct cmd_node) Add a hash, so duplicate installs of\n  a cmd_element to a command node can be detected.  To help catch\n  strays from the VIEW/ENABLE node consolidation particularly\n  (installs to VIEW automatically install to ENABLE too now).\n* command.c: (cmd_hash_{key,cmp}) helpers for the hash - just directly\n  on the pointer value is sufficient to catch the main problem.\n  (install_node) setup the hash for the command node.\n  (install_element) check for duplicate installs.\n  The assert on the cmd_parse_format seems misplaced.\n  (install_default_basic) separate the basic, VIEW, node default commands\n  to here.\n  (cmd_init) get rid of dupes, given consolidation.\n  (cmd_terminate) clean up the node command hash.\n\nNot done: The (struct cmd_node)\u0027s vector could be replaced with the\ncmd hash, however much of the command parser depends heavily on the\nvector and it\u0027s a lot of work to change.  A vector_lookup_value could\nalso work, particularly if vector could be backed by a hash.\n\nThe duplicate check could be disabled in releases - but useful in\ndevelopment.  It\u0027s a little extra overhead at startup.  The command\ninitialisation overhead is already something that bites in\nmicro-benchmarks - makes it easy for other implementations to show\nhow much faster they are with benchmarks where other load is low\nenough that startup time is a factor.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "12e8bb100704c575fe662cb402816229480a5b9a",
      "old_mode": 33188,
      "old_path": "lib/command.c",
      "new_id": "fa2ef1180e8c433a5679a242e8e90b9519edd387",
      "new_mode": 33188,
      "new_path": "lib/command.c"
    },
    {
      "type": "modify",
      "old_id": "09bc516d6f599ec719f042748250a4311d95496b",
      "old_mode": 33188,
      "old_path": "lib/command.h",
      "new_id": "214b1d51bc644bd96177bd4805d527ac2b406d9c",
      "new_mode": 33188,
      "new_path": "lib/command.h"
    }
  ]
}
