git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/6] merge: simplify ff-only option

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Sep 2, 2013, 22:17 UTC
Message-ID
<1378160278-14872-2-git-send-email-felipe.contreras@gmail.com>
In-Reply-To
<1378160278-14872-1-git-send-email-felipe.contreras@gmail.com>
No functional changes.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 builtin/merge.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/builtin/merge.c b/builtin/merge.c
index 34a6166..da9fc08 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")),
-- 
1.8.4-338-gefd7fa6
Previous: Felipe ContrerasNext: Felipe Contreras
Message 2 of 7 in “Preparation for non-ff pulls by default”
  1. 0/6 Preparation for non-ff pulls by defaultFelipe Contreras, Sep 2, 2013
  2. 1/6 merge: simplify ff-only optionFelipe Contreras, Sep 2, 2013
  3. 2/6 t: replace pulls with mergesFelipe Contreras, Sep 2, 2013
  4. 3/6 pull: rename pull.rename to pull.modeFelipe Contreras, Sep 2, 2013
  5. 4/6 pull: refactor $rebase variable into $modeFelipe Contreras, Sep 2, 2013
  6. 5/6 pull: add --merge optionFelipe Contreras, Sep 2, 2013
  7. 6/6 pull: add merge-ff-only optionFelipe Contreras, Sep 2, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.