From: Junio C Hamano <gitster@pobox.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: "Git Mailing List" <git@vger.kernel.org>,
"Jeff King" <peff@peff.net>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: Re: [PATCH 4/4] parse-options: simplify parse_options_dup()
Date: Mon, 10 Feb 2020 09:49:45 -0800 [thread overview]
Message-ID: <xmqqh7zy1gee.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <162fb36a-6dd1-c178-9032-d3f4213930a6@web.de> ("René Scharfe"'s message of "Sun, 9 Feb 2020 16:58:42 +0100")
René Scharfe <l.s.r@web.de> writes:
> 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.
next prev parent reply other threads:[~2020-02-10 17:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-09 15:53 [PATCH 0/4] parse-options: simplify parse_options_concat() and parse_options_dup() René Scharfe
2020-02-09 15:55 ` [PATCH 1/4] parse-options: use COPY_ARRAY in parse_options_concat() René Scharfe
2020-02-09 15:56 ` [PATCH 2/4] parse-options: factor out parse_options_count() René Scharfe
2020-02-09 17:56 ` Eric Sunshine
2020-02-09 18:36 ` René Scharfe
2020-02-09 15:57 ` [PATCH 3/4] parse-options: const parse_options_concat() parameters René Scharfe
2020-02-09 15:58 ` [PATCH 4/4] parse-options: simplify parse_options_dup() René Scharfe
2020-02-10 17:49 ` Junio C Hamano [this message]
2020-02-10 22:25 ` [PATCH 0/4] parse-options: simplify parse_options_concat() and parse_options_dup() Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqh7zy1gee.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).