Skip to content

Commit 90f867b

Browse files
felipecgitster
authored andcommitted
merge: simplify ff-only option
No functional changes. Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 42817b9 commit 90f867b

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

builtin/merge.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,6 @@ static int option_parse_n(const struct option *opt,
186186
return 0;
187187
}
188188

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-
196189
static struct option builtin_merge_options[] = {
197190
{ OPTION_CALLBACK, 'n', NULL, NULL, NULL,
198191
N_("do not show a diffstat at the end of the merge"),
@@ -210,9 +203,9 @@ static struct option builtin_merge_options[] = {
210203
OPT_BOOL('e', "edit", &option_edit,
211204
N_("edit message before committing")),
212205
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,
214207
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 },
216209
OPT_RERERE_AUTOUPDATE(&allow_rerere_auto),
217210
OPT_BOOL(0, "verify-signatures", &verify_signatures,
218211
N_("Verify that the named commit has a valid GPG signature")),

0 commit comments

Comments
 (0)