summaryrefslogtreecommitdiff
path: root/builtin/merge.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-11-06 14:34:43 -0800
committerJunio C Hamano <gitster@pobox.com>2013-11-06 14:34:43 -0800
commit152a9c17a802379a3a48e025b74dedd76e2623cc (patch)
tree35adf01f3da51119a475392076d1cb290b800a00 /builtin/merge.c
parentf26f72de159d7ade2fbe8b48734ce98c1aba4d72 (diff)
parentabf03eeb8e99538cd31806d5f252214b9fe695a6 (diff)
downloadgit-152a9c17a802379a3a48e025b74dedd76e2623cc.tar.gz
Merge branch 'fc/trivial'
A random collection of style fixes and minor doc updates. * fc/trivial: setup: trivial style fixes run-command: trivial style fixes diff: trivial style fix revision: trivial style fixes pretty: trivial style fix describe: trivial style fixes transport-helper: trivial style fix sha1-name: trivial style cleanup branch: trivial style fix revision: add missing include doc/pull: clarify the illustrations t: replace pulls with merges merge: simplify ff-only option
Diffstat (limited to 'builtin/merge.c')
-rw-r--r--builtin/merge.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index 02a69c14e6..41fb66dec2 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -186,13 +186,6 @@ static int option_parse_n(const struct option *opt,
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"),
@@ -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),
- { OPTION_CALLBACK, 0, "ff-only", NULL, NULL,
+ { OPTION_SET_INT, 0, "ff-only", &fast_forward, NULL,
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")),