checkout: split options[] array in three pieces

This is a preparation step for introducing new commands that do parts
of what checkout does. There will be two new commands, one is about
switching branches, detaching HEAD... one about checking out
paths. These share the a subset of command line options. The rest of
command line options are separate.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2019-03-29 17:39:04 +07:00
committed by Junio C Hamano
parent 55cf704a9d
commit 2087182272
3 changed files with 77 additions and 23 deletions

View File

@ -257,6 +257,7 @@ int parse_options_step(struct parse_opt_ctx_t *ctx,
int parse_options_end(struct parse_opt_ctx_t *ctx);
struct option *parse_options_dup(const struct option *a);
struct option *parse_options_concat(struct option *a, struct option *b);
/*----- some often used options -----*/