merge: simplify ff-only option
No functional changes. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras committed
Oct 31, 2013 at 03:25 UTC
90f867b9a5088a2ea6f5844ae28b617821e77b28
1 file changed
+2
-9
builtin/merge.c
+2
-9
@@ -186,13 +186,6 @@ static int option_parse_n(const struct option *opt,
186
return 0;
187
}
188
189
-static int option_parse_ff_only(const struct option *opt,
190
- const char *arg, int unset)
191
-{
192
- fast_forward = FF_ONLY;
193
- return 0;
194
-}
195
-
189
static struct option builtin_merge_options[] = {
190
{ OPTION_CALLBACK, 'n', NULL, NULL, NULL,
191
N_("do not show a diffstat at the end of the merge"),
@@ -210,9 +203,9 @@ static struct option builtin_merge_options[] = {
203
OPT_BOOL('e', "edit", &option_edit,
204
N_("edit message before committing")),
205
OPT_SET_INT(0, "ff", &fast_forward, N_("allow fast-forward (default)"), FF_ALLOW),
213
- { OPTION_CALLBACK, 0, "ff-only", NULL, NULL,
206
+ { OPTION_SET_INT, 0, "ff-only", &fast_forward, NULL,
207
N_("abort if fast-forward is not possible"),
215
- PARSE_OPT_NOARG | PARSE_OPT_NONEG, option_parse_ff_only },
208
+ PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, FF_ONLY },
209
OPT_RERERE_AUTOUPDATE(&allow_rerere_auto),
210
OPT_BOOL(0, "verify-signatures", &verify_signatures,
211
N_("Verify that the named commit has a valid GPG signature")),