diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-05-20 17:42:58 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-24 16:12:29 +0900 |
commit | 3e4a67b47d020c8c61d8a762d1903f5288e94778 (patch) | |
tree | 7ea0d479d94f8e8ef89b62230cd0d9606dc8a0c6 /builtin/fetch.c | |
parent | e144d126d74f5d2702870ca9423743102eec6fcd (diff) | |
download | git-3e4a67b47d020c8c61d8a762d1903f5288e94778.tar.gz |
Use OPT_SET_INT_F() for cmdline option specification
The only thing these commands need is extra parseopt flag which can be
passed in by OPT_SET_INT_F() and it is a bit more compact than full
struct initialization.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r-- | builtin/fetch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index 1f037e8e4b..0a4512b0fb 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -157,9 +157,9 @@ static struct option builtin_fetch_options[] = { N_("deepen history of shallow clone, excluding rev")), OPT_INTEGER(0, "deepen", &deepen_relative, N_("deepen history of shallow clone")), - { OPTION_SET_INT, 0, "unshallow", &unshallow, NULL, - N_("convert to a complete repository"), - PARSE_OPT_NONEG | PARSE_OPT_NOARG, NULL, 1 }, + OPT_SET_INT_F(0, "unshallow", &unshallow, + N_("convert to a complete repository"), + 1, PARSE_OPT_NONEG), { OPTION_STRING, 0, "submodule-prefix", &submodule_prefix, N_("dir"), N_("prepend this to submodule path output"), PARSE_OPT_HIDDEN }, { OPTION_CALLBACK, 0, "recurse-submodules-default", |