aboutsummaryrefslogtreecommitdiffstats
path: root/archive.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-05-20 17:42:58 +0200
committerJunio C Hamano <gitster@pobox.com>2018-05-24 16:12:29 +0900
commit3e4a67b47d020c8c61d8a762d1903f5288e94778 (patch)
tree7ea0d479d94f8e8ef89b62230cd0d9606dc8a0c6 /archive.c
parente144d126d74f5d2702870ca9423743102eec6fcd (diff)
downloadgit-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 'archive.c')
-rw-r--r--archive.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/archive.c b/archive.c
index 93ab175b0b..4fe7bec60c 100644
--- a/archive.c
+++ b/archive.c
@@ -411,11 +411,9 @@ static void parse_treeish_arg(const char **argv,
}
#define OPT__COMPR(s, v, h, p) \
- { OPTION_SET_INT, (s), NULL, (v), NULL, (h), \
- PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, (p) }
+ OPT_SET_INT_F(s, NULL, v, h, p, PARSE_OPT_NONEG)
#define OPT__COMPR_HIDDEN(s, v, p) \
- { OPTION_SET_INT, (s), NULL, (v), NULL, "", \
- PARSE_OPT_NOARG | PARSE_OPT_NONEG | PARSE_OPT_HIDDEN, NULL, (p) }
+ OPT_SET_INT_F(s, NULL, v, "", p, PARSE_OPT_NONEG | PARSE_OPT_HIDDEN)
static int parse_archive_args(int argc, const char **argv,
const struct archiver **ar, struct archiver_args *args,