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

Re: [PATCH v2] parse-opt: migrate builtin-checkout-index.

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 17, 2008, 23:58 UTC
Message-ID
<7v63nqg4f4.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20081016132810.GG536@genesis.frugalware.org>
Miklos Vajna <vmiklos@frugalware.org> writes:
Show 10 quoted lines
> +static int option_parse_z(const struct option *opt,
> +			  const char *arg, int unset)
> +{
> +	line_termination = unset;
> +	return 0;
> +}
> ...
> +		{ OPTION_CALLBACK, 'z', NULL, NULL, NULL,
> +			"paths are separated with NUL character",
> +			PARSE_OPT_NOARG, option_parse_z },

This adds a new feature to say --no-z from the command line, doesn't it? And I suspect the feature is broken ;-).

Show 10 quoted lines
> +		OPT_BOOLEAN(0, "stdin", &read_from_stdin,
> +			"read list of paths from the standard input"),
> ...
> +	argc = parse_options(argc, argv, builtin_checkout_index_options,
> +			builtin_checkout_index_usage, 0);
> +	state.force = force;
> +	state.quiet = quiet;
> +	state.not_new = not_new;
> +	if (argc && read_from_stdin)
> +		die("--stdin must be at the end");

Is this comment still correct? Do the original and your version act the same way when the user says "checkout --stdin -f", for example? I suspect the original refused it and yours take it (and do much more sensible thing), which would be an improvement, but then the error message should be reworded perhaps?

Previous: Miklos VajnaNext: Miklos Vajna
Message 4 of 9 in “parse-opt: migrate builtin-checkout-index.”
  1. parse-opt: migrate builtin-checkout-index.Miklos Vajna, Oct 15, 2008
  2. Pierre HabouzitOct 16, 2008
  3. parse-opt: migrate builtin-checkout-index.Miklos Vajna, Oct 16, 2008
  4. Junio C HamanoOct 17, 2008
  5. parse-opt: migrate builtin-checkout-index.Miklos Vajna, Oct 18, 2008
  6. Raphael ZimmererOct 19, 2008
  7. Pierre HabouzitOct 19, 2008
  8. Junio C HamanoOct 19, 2008
  9. Pierre HabouzitOct 18, 2008

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.