Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-05-20 18:42:58 +0300
committerJunio C Hamano <gitster@pobox.com>2018-05-24 10:12:29 +0300
commit3e4a67b47d020c8c61d8a762d1903f5288e94778 (patch)
tree7ea0d479d94f8e8ef89b62230cd0d9606dc8a0c6 /builtin/grep.c
parente144d126d74f5d2702870ca9423743102eec6fcd (diff)
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/grep.c')
-rw-r--r--builtin/grep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/grep.c b/builtin/grep.c
index 6e7bc76785..850bcffd99 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -885,9 +885,9 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
N_("indicate hit with exit status without output")),
OPT_BOOL(0, "all-match", &opt.all_match,
N_("show only matches from files that match all patterns")),
- { OPTION_SET_INT, 0, "debug", &opt.debug, NULL,
- N_("show parse tree for grep expression"),
- PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, NULL, 1 },
+ OPT_SET_INT_F(0, "debug", &opt.debug,
+ N_("show parse tree for grep expression"),
+ 1, PARSE_OPT_HIDDEN),
OPT_GROUP(""),
{ OPTION_STRING, 'O', "open-files-in-pager", &show_in_pager,
N_("pager"), N_("show matching files in the pager"),