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

Re: [PATCH 1/3] fast-export: improve argument parsing

From
Junio C Hamano <gitster@pobox.com>
Date
May 9, 2013, 22:17 UTC
Message-ID
<7vzjw37q7o.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1368063095-22861-2-git-send-email-felipe.contreras@gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
> We don't want to pass arguments specific to fast-export to
> setup_revisions.
Interesting.  What bad things happen with the current order?

Does "fast-export --export-marks=foo" causes setup_revisions() to mistakenly eat --export-marks=foo and barf?

Show 20 quoted lines
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  builtin/fast-export.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/builtin/fast-export.c b/builtin/fast-export.c
> index d60d675..6e46057 100644
> --- a/builtin/fast-export.c
> +++ b/builtin/fast-export.c
> @@ -686,8 +686,9 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
>  	revs.topo_order = 1;
>  	revs.show_source = 1;
>  	revs.rewrite_parents = 1;
> +	argc = parse_options(argc, argv, prefix, options, fast_export_usage,
> +			PARSE_OPT_KEEP_ARGV0 | PARSE_OPT_KEEP_UNKNOWN);
>  	argc = setup_revisions(argc, argv, &revs, NULL);
> -	argc = parse_options(argc, argv, prefix, options, fast_export_usage, 0);
>  	if (argc > 1)
>  		usage_with_options (fast_export_usage, options);
There is a SP between the function name and its arguments here ;-)
Previous: Felipe ContrerasNext: Felipe Contreras
Message 3 of 19 in “Support for old:new remote-helper push”
  1. 0/3 Support for old:new remote-helper pushFelipe Contreras, May 9, 2013
  2. 1/3 fast-export: improve argument parsingFelipe Contreras, May 9, 2013
  3. Junio C HamanoMay 9, 2013
  4. Felipe ContrerasMay 9, 2013
  5. Junio C HamanoMay 9, 2013
  6. Felipe ContrerasMay 9, 2013
  7. Junio C HamanoMay 10, 2013
  8. 2/3 fast-export: add new --refspec optionFelipe Contreras, May 9, 2013
  9. Junio C HamanoMay 9, 2013
  10. Felipe ContrerasMay 9, 2013
  11. Junio C HamanoMay 9, 2013
  12. Felipe ContrerasMay 9, 2013
  13. Junio C HamanoMay 10, 2013
  14. Felipe ContrerasMay 10, 2013
  15. Junio C HamanoMay 10, 2013
  16. Johannes SixtMay 10, 2013
  17. Felipe ContrerasMay 16, 2013
  18. 3/3 transport-helper: add support for old:new refspecFelipe Contreras, May 9, 2013
  19. Felipe ContrerasMay 16, 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.