From 3e4a67b47d020c8c61d8a762d1903f5288e94778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sun, 20 May 2018 17:42:58 +0200 Subject: Use OPT_SET_INT_F() for cmdline option specification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- builtin/ls-files.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'builtin/ls-files.c') diff --git a/builtin/ls-files.c b/builtin/ls-files.c index a71f6bd088..40d9138c46 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -556,9 +556,9 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix) { OPTION_CALLBACK, 0, "exclude-standard", &dir, NULL, N_("add the standard git exclusions"), PARSE_OPT_NOARG, option_parse_exclude_standard }, - { OPTION_SET_INT, 0, "full-name", &prefix_len, NULL, - N_("make the output relative to the project top directory"), - PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL }, + OPT_SET_INT_F(0, "full-name", &prefix_len, + N_("make the output relative to the project top directory"), + 0, PARSE_OPT_NONEG), OPT_BOOL(0, "recurse-submodules", &recurse_submodules, N_("recurse through submodules")), OPT_BOOL(0, "error-unmatch", &error_unmatch, -- cgit v1.2.3