Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
merge: simplify ff-only option
author
Felipe Contreras
<felipe.contreras@gmail.com>
Thu, 31 Oct 2013 09:25:32 +0000
(
03:25
-0600)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 31 Oct 2013 18:12:24 +0000
(11:12 -0700)
No functional changes.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
42817b9
)
diff --git
a/builtin/merge.c
b/builtin/merge.c
index 02a69c14e6abfc51413b397a93180e0890285e2a..41fb66dec2c2fd9645a72c28c362067fb3bcc16c 100644
(file)
--- a/
builtin/merge.c
+++ b/
builtin/merge.c
@@
-186,13
+186,6
@@
static int option_parse_n(const struct option *opt,
return 0;
}
return 0;
}
-static int option_parse_ff_only(const struct option *opt,
- const char *arg, int unset)
-{
- fast_forward = FF_ONLY;
- return 0;
-}
-
static struct option builtin_merge_options[] = {
{ OPTION_CALLBACK, 'n', NULL, NULL, NULL,
N_("do not show a diffstat at the end of the merge"),
static struct option builtin_merge_options[] = {
{ OPTION_CALLBACK, 'n', NULL, NULL, NULL,
N_("do not show a diffstat at the end of the merge"),
@@
-210,9
+203,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),
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_
CALLBACK, 0, "ff-only", NULL
, NULL,
+ { OPTION_
SET_INT, 0, "ff-only", &fast_forward
, NULL,
N_("abort if fast-forward is not possible"),
N_("abort if fast-forward is not possible"),
- PARSE_OPT_NOARG | PARSE_OPT_NONEG,
option_parse_ff_only
},
+ PARSE_OPT_NOARG | PARSE_OPT_NONEG,
NULL, FF_ONLY
},
OPT_RERERE_AUTOUPDATE(&allow_rerere_auto),
OPT_BOOL(0, "verify-signatures", &verify_signatures,
N_("Verify that the named commit has a valid GPG signature")),
OPT_RERERE_AUTOUPDATE(&allow_rerere_auto),
OPT_BOOL(0, "verify-signatures", &verify_signatures,
N_("Verify that the named commit has a valid GPG signature")),