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/merge.c | |
| parent | e144d126d74f5d2702870ca9423743102eec6fcd (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/merge.c')
| -rw-r--r-- | builtin/merge.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/merge.c b/builtin/merge.c index 9db5a2cf16..4be71dd81b 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -213,9 +213,9 @@ static struct option builtin_merge_options[] = { OPT_BOOL('e', "edit", &option_edit, N_("edit message before committing")), OPT_SET_INT(0, "ff", &fast_forward, N_("allow fast-forward (default)"), FF_ALLOW), - { OPTION_SET_INT, 0, "ff-only", &fast_forward, NULL, - N_("abort if fast-forward is not possible"), - PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, FF_ONLY }, + OPT_SET_INT_F(0, "ff-only", &fast_forward, + N_("abort if fast-forward is not possible"), + FF_ONLY, PARSE_OPT_NONEG), OPT_RERERE_AUTOUPDATE(&allow_rerere_auto), OPT_BOOL(0, "verify-signatures", &verify_signatures, N_("verify that the named commit has a valid GPG signature")), |
