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

Re: [PATCH 01/16] merge: simplify ff-only option

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 31, 2013, 18:04 UTC
Message-ID
<xmqqhabx8ggs.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1383211547-9145-2-git-send-email-felipe.contreras@gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 37 quoted lines
> 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 02a69c1..41fb66d 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")),
Looks good; thanks.
Previous: Felipe ContrerasNext: Felipe Contreras
Message 3 of 48 in “Trivial patches”
  1. 00/16 Trivial patchesFelipe Contreras, Oct 31, 2013
  2. 01/16 merge: simplify ff-only optionFelipe Contreras, Oct 31, 2013
  3. Junio C HamanoOct 31, 2013
  4. 02/16 t: replace pulls with mergesFelipe Contreras, Oct 31, 2013
  5. 03/16 pull: cleanup documentationFelipe Contreras, Oct 31, 2013
  6. Junio C HamanoOct 31, 2013
  7. Felipe ContrerasOct 31, 2013
  8. Junio C HamanoOct 31, 2013
  9. Max HornOct 31, 2013
  10. Junio C HamanoOct 31, 2013
  11. Junio C HamanoOct 31, 2013
  12. Felipe ContrerasOct 31, 2013
  13. David AguilarOct 31, 2013
  14. Felipe ContrerasNov 1, 2013
  15. David AguilarNov 1, 2013
  16. Felipe ContrerasNov 1, 2013
  17. SZEDER GáborNov 1, 2013
  18. Felipe ContrerasNov 1, 2013
  19. Felipe ContrerasOct 31, 2013
  20. Junio C HamanoOct 31, 2013
  21. Felipe ContrerasOct 31, 2013
  22. 04/16 fetch: add missing documentationFelipe Contreras, Oct 31, 2013
  23. Junio C HamanoOct 31, 2013
  24. Felipe ContrerasOct 31, 2013
  25. 05/16 revision: add missing includeFelipe Contreras, Oct 31, 2013
  26. Junio C HamanoOct 31, 2013
  27. 06/16 shortlog: add missing declarationFelipe Contreras, Oct 31, 2013
  28. Junio C HamanoOct 31, 2013
  29. Felipe ContrerasOct 31, 2013
  30. Junio C HamanoOct 31, 2013
  31. Felipe ContrerasOct 31, 2013
  32. 07/16 branch: trivial style fixFelipe Contreras, Oct 31, 2013
  33. Junio C HamanoOct 31, 2013
  34. 08/16 sha1-name: trivial style cleanupFelipe Contreras, Oct 31, 2013
  35. 09/16 transport-helper: trivial style fixFelipe Contreras, Oct 31, 2013
  36. 10/16 describe: trivial style fixesFelipe Contreras, Oct 31, 2013
  37. 11/16 pretty: trivial style fixFelipe Contreras, Oct 31, 2013
  38. 12/16 revision: trivial style fixesFelipe Contreras, Oct 31, 2013
  39. 13/16 diff: trivial style fixFelipe Contreras, Oct 31, 2013
  40. 14/16 run-command: trivial style fixesFelipe Contreras, Oct 31, 2013
  41. 15/16 setup: trivial style fixesFelipe Contreras, Oct 31, 2013
  42. Junio C HamanoOct 31, 2013
  43. 16/16 add: avoid yoda conditionsFelipe Contreras, Oct 31, 2013
  44. Martin von ZweigbergkOct 31, 2013
  45. Felipe ContrerasOct 31, 2013
  46. Junio C HamanoOct 31, 2013
  47. Felipe ContrerasOct 31, 2013
  48. Max HornOct 31, 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.