From 3e4a67b47d020c8c61d8a762d1903f5288e94778 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy 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/notes.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'builtin/notes.c') diff --git a/builtin/notes.c b/builtin/notes.c index e5bf80eef1..4d34994c34 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -778,13 +778,13 @@ static int merge(int argc, const char **argv, const char *prefix) N_("resolve notes conflicts using the given strategy " "(manual/ours/theirs/union/cat_sort_uniq)")), OPT_GROUP(N_("Committing unmerged notes")), - { OPTION_SET_INT, 0, "commit", &do_commit, NULL, - N_("finalize notes merge by committing unmerged notes"), - PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, 1}, + OPT_SET_INT_F(0, "commit", &do_commit, + N_("finalize notes merge by committing unmerged notes"), + 1, PARSE_OPT_NONEG), OPT_GROUP(N_("Aborting notes merge resolution")), - { OPTION_SET_INT, 0, "abort", &do_abort, NULL, - N_("abort notes merge"), - PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, 1}, + OPT_SET_INT_F(0, "abort", &do_abort, + N_("abort notes merge"), + 1, PARSE_OPT_NONEG), OPT_END() }; -- cgit v1.3-6-g1900