)]}'
{
  "commit": "9ff6c6923cfffbcd502984b8e0c80539a94968b7",
  "tree": "c4a238b6f2150d68b981aa21bb451dc634c459ef",
  "parents": [
    "a9a634f3de0a7529baded7ad6b0c7467d5c6eca7"
  ],
  "author": {
    "name": "Ian Campbell",
    "email": "ijc25@users.noreply.github.com",
    "time": "Mon Jan 30 21:42:45 2017 +0000"
  },
  "committer": {
    "name": "Eric Paris",
    "email": "eparis@redhat.com",
    "time": "Mon Jan 30 16:42:45 2017 -0500"
  },
  "message": "Add FlagSet.FlagUsagesWrapped(cols) which wraps to the given column (#105)\n\nThis will allow applications to provide better help text without feeling\r\nconstrained by how it will wrap even on 80 column displays etc. This has been a\r\nfactor in tickets such as https://github.com/docker/docker/issues/18797.\r\n\r\nThe basic wrapping algorithm is rather simplistic, it will look for the last\r\nwhitespace (space or tab) before the given column and wrap there, indenting the\r\ncontinuation lines to match the usage text (i.e. aligned after the flag names\r\nthemselves), e.g. when applied to `docker ps` wrapping at 70 columns (fairly\r\nnarrow):\r\n\r\nOptions:\r\n[...]\r\n  -f, --filter filter   Filter output based on conditions provided\r\n[...]\r\n  -n, --last int        Show n last created containers\r\n                        (includes all states) (default -1)\r\n  -l, --latest          Show the latest created container\r\n                        (includes all states)\r\n\r\nThere are two main tweaks to this basic algorithm, first is to actually try and\r\nwrap to a soft limit 5 columns less than requested but allow the line to take\r\nup the full hard width if that prevents pushing a short word at the end of the\r\nstring to the next line which looks odd, particuarly for usage which ends with\r\n\"(default [])\" and wraps the \"[])\" to the last line.\r\n\r\nSecond if the display is too narrow, meaning after indentation for the flag\r\nnames there is less than 24 columns allowed for the help text (24 chosen just\r\nby my eye and what I thought looked odd) then it will start the help text on\r\nthe next line indented to the 16th column (16 chosen so as not to align with\r\nthe first character of either the short of long flag name as 8 would, since\r\nthat looked strange to me), e.g. wrapping the above example to a rather narrow\r\n45 columns:\r\n\r\nOptions:\r\n[...]\r\n  -f, --filter filter\r\n                Filter output based on\r\n                conditions provided\r\n[...]\r\n  -n, --last int\r\n                Show n last created\r\n                containers (includes\r\n                all states) (default -1)\r\n  -l, --latest\r\n                Show the latest\r\n                created container\r\n                (includes all states)\r\n\r\nIf even with starting the help on the next line there is still less than 24\r\ncharacters of space available for the help text (implying columns \u003c 24 + 16 \u003d\u003d\r\n40) just give up and return the unwrapped version (same as before this change).\r\n\r\nSigned-off-by: Ian Campbell \u003cian.campbell@docker.com\u003e,",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3f5fedd8363ed48bb6beb6539391bdf6f26aded5",
      "old_mode": 33188,
      "old_path": "flag.go",
      "new_id": "746af6327e4ba4e7bc23d75fb76ee174a85e5aa2",
      "new_mode": 33188,
      "new_path": "flag.go"
    }
  ]
}
