Re: [PATCH v5 04/14] trailer: process command line trailer arguments
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 7, 2014, 00:08 UTC
- Message-ID
- <xmqqmwi3wzrb.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20140206202004.325.93876.chriscool@tuxfamily.org>
Christian Couder <chriscool@tuxfamily.org> writes:
> This patch parses the trailer command line arguments > and put the result into an arg_tok doubly linked > list.
No the patch doesn't parse anything ;-).
"Parse the command line arguments and ...".
Show 5 quoted lines
> +static void parse_trailer(struct strbuf *tok, struct strbuf *val, const char *trailer)
> +{
> + const char *end = strchr(trailer, '=');
> + if (!end)
> + end = strchr(trailer, ':');How would you explain the behaviour of the above code for this input?
frotz: nitfol=xyzzy
Perhaps strcspn()?