)]}'
{
  "commit": "6aa1fb2271f42396b7e142edd46c08f7a428c8be",
  "tree": "39831aae044ed5c251f263df72e1f6fed2f59c8b",
  "parents": [
    "1630431f326e15fcde608827b5ff38422528eb59"
  ],
  "author": {
    "name": "Christian Couder",
    "email": "christian.couder@gmail.com",
    "time": "Mon Nov 02 16:14:49 2026 +0100"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Mon Nov 02 11:02:27 2026 -0800"
  },
  "message": "parse-options: add parse_options_takes_argument()\n\nWhether an option takes a value, and therefore consumes the next\nargument when that value is not stuck to it with an \u0027\u003d\u0027, is decided by\nits type and its flags. That rule is currently open-coded in\nshow_gitcomp(), which needs it to decide if it should append an \u0027\u003d\u0027 to\nthe option it completes.\n\nA following commit will need the same rule to find out which options an\nearly scan of the command line has to skip along with their value.\n\nSo let\u0027s factor that rule out into a new parse_options_takes_argument()\nfunction, and let\u0027s use it in show_gitcomp().\n\nNote that an option with PARSE_OPT_LASTARG_DEFAULT only consumes the\nnext argument when it isn\u0027t the last one. It is considered as taking a\nvalue by parse_options_takes_argument(), as an early scan can easily\ncheck whether there is a next argument, and would otherwise wrongly\ntake that argument for an option. show_gitcomp() keeps not appending\nan \u0027\u003d\u0027 to such an option though, as it already did, since its value is\noptional.\n\nSigned-off-by: Christian Couder \u003cchristian.couder@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4519ead9dc77b8f55c2924e3250e5393928258d7",
      "old_mode": 33188,
      "old_path": "parse-options.c",
      "new_id": "d7cbb5a343a1aeb1cc3b18891d4330e1c8e0cf9f",
      "new_mode": 33188,
      "new_path": "parse-options.c"
    },
    {
      "type": "modify",
      "old_id": "d7f896a933702456bdc246e4d1e19bea9967f590",
      "old_mode": 33188,
      "old_path": "parse-options.h",
      "new_id": "589f8d900837daaab343fe6322af684cfa1199c9",
      "new_mode": 33188,
      "new_path": "parse-options.h"
    }
  ]
}
