OPT_BOOLEAN(0, "commit", &option_commit,
"perform a commit if the merge succeeds (default)"),
OPT_BOOLEAN(0, "ff", &allow_fast_forward,
- "allow fast forward (default)"),
+ "allow fast-forward (default)"),
+ OPT_BOOLEAN(0, "ff-only", &fast_forward_only,
- "abort if fast forward is not possible"),
++ "abort if fast-forward is not possible"),
OPT_CALLBACK('s', "strategy", &use_strategies, "strategy",
"merge strategy to use", option_parse_strategy),
OPT_CALLBACK('m', "message", &merge_msg, "message",
}
}
- die("Not possible to fast forward, aborting.");
+ if (fast_forward_only)
++ die("Not possible to fast-forward, aborting.");
+
/* We are going to make a new commit. */
git_committer_info(IDENT_ERROR_ON_NO_NAME);