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/log.c | |
parent | The sixth batch for 2.18 (diff) | |
download | tgif-3e4a67b47d020c8c61d8a762d1903f5288e94778.tar.xz |
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/log.c')
-rw-r--r-- | builtin/log.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/log.c b/builtin/log.c index a15599f4f0..4686f68594 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1474,9 +1474,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) N_("output all-zero hash in From header")), OPT_BOOL(0, "ignore-if-in-upstream", &ignore_if_in_upstream, N_("don't include a patch matching a commit upstream")), - { OPTION_SET_INT, 'p', "no-stat", &use_patch_format, NULL, - N_("show patch format instead of default (patch + stat)"), - PARSE_OPT_NONEG | PARSE_OPT_NOARG, NULL, 1}, + OPT_SET_INT_F('p', "no-stat", &use_patch_format, + N_("show patch format instead of default (patch + stat)"), + 1, PARSE_OPT_NONEG), OPT_GROUP(N_("Messaging")), { OPTION_CALLBACK, 0, "add-header", NULL, N_("header"), N_("add email header"), 0, header_callback }, |