]> git.ipfire.org Git - thirdparty/git.git/commit
parseopt: extract subcommand handling from parse_options_step()
authorJiamu Sun <39@barroit.sh>
Thu, 23 Apr 2026 01:37:51 +0000 (10:37 +0900)
committerJunio C Hamano <gitster@pobox.com>
Thu, 23 Apr 2026 02:02:14 +0000 (11:02 +0900)
commitda0cdf9dc1a49cacab2cafa39a9f2253d6712bc8
tree0afd23d8f55b079245773f30d68e7039a1488c2b
parentd181b9354cf85b44455ce3ca9e6af0b9559e0ae2
parseopt: extract subcommand handling from parse_options_step()

Move the subcommand branch out of parse_options_step() into a new
handle_subcommand() helper. Also, make parse_subcommand() return a
simple success/failure status.

This removes the switch over impossible parse_opt_result values and
makes the non-option path easier to follow and maintain.

Signed-off-by: Jiamu Sun <39@barroit.sh>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
parse-options.c