summaryrefslogtreecommitdiff
path: root/builtin/ls-files.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 /builtin/ls-files.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 'builtin/ls-files.c')
-rw-r--r--builtin/ls-files.c6
1 files changed, 3 insertions, 3 deletions
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,