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

Re: [PATCH 4/4] parse-options: simplify parse_options_dup()

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 10, 2020, 17:49 UTC
Message-ID
<xmqqh7zy1gee.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<162fb36a-6dd1-c178-9032-d3f4213930a6@web.de>
René Scharfe <l.s.r@web.de> writes:
Show 7 quoted lines
> Simplify parse_options_dup() by making it a trivial wrapper of
> parse_options_concat() by making use of the facts that the latter
> duplicates its input as well and that appending an empty set is a no-op.
> ...
> +	struct option no_options[] = { OPT_END() };
> +
> +	return parse_options_concat(o, no_options);
Can't say if this is tricky or cute, but I like it ;-)
Will queue all four.  Thanks.
Previous: René ScharfeNext: Jeff King
Message 8 of 9 in “parse-options: simplify parse_options_concat() and parse_options_dup()”
  1. 0/4 parse-options: simplify parse_options_concat() and parse_options_dup()René Scharfe, Feb 9, 2020
  2. 1/4 parse-options: use COPY_ARRAY in parse_options_concat()René Scharfe, Feb 9, 2020
  3. 2/4 parse-options: factor out parse_options_count()René Scharfe, Feb 9, 2020
  4. Eric SunshineFeb 9, 2020
  5. René ScharfeFeb 9, 2020
  6. 3/4 parse-options: const parse_options_concat() parametersRené Scharfe, Feb 9, 2020
  7. 4/4 parse-options: simplify parse_options_dup()René Scharfe, Feb 9, 2020
  8. Junio C HamanoFeb 10, 2020
  9. Jeff KingFeb 10, 2020

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.