From: Junio C Hamano <gitster@pobox.com>
To: Christian Couder <chriscool@tuxfamily.org>
Cc: git@vger.kernel.org, Johan Herland <johan@herland.net>,
Josh Triplett <josh@joshtriplett.org>,
Thomas Rast <tr@thomasrast.ch>,
Michael Haggerty <mhagger@alum.mit.edu>,
Dan Carpenter <dan.carpenter@oracle.com>,
Greg Kroah-Hartman <greg@kroah.com>, Jeff King <peff@peff.net>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v6 02/11] trailer: process trailers from stdin and arguments
Date: Wed, 05 Mar 2014 14:52:47 -0800 [thread overview]
Message-ID: <xmqqiors1cn4.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: 20140304194810.14249.7378.chriscool@tuxfamily.org
Christian Couder <chriscool@tuxfamily.org> writes:
> Implement the logic to process trailers from stdin and arguments.
>
> At the beginning trailers from stdin are in their own in_tok
> doubly linked list, and trailers from arguments are in their own
> arg_tok doubly linked list.
>
> The lists are traversed and when an arg_tok should be "applied",
> it is removed from its list and inserted into the in_tok list.
>
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
> ---
Thanks.
This round is marked as the sixth, but I still see quite a many
style issues, which I expect not to see from long timers without
being told. Somewhat disappointing...
> trailer.c | 197 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 197 insertions(+)
>
> diff --git a/trailer.c b/trailer.c
> index db93a63..a0124f2 100644
> --- a/trailer.c
> +++ b/trailer.c
> @@ -47,3 +47,200 @@ static size_t alnum_len(const char *buf, size_t len)
> ...
> + if ((where == WHERE_AFTER ? in_tok->next : in_tok->previous) == arg_tok)
Overlong line that does not have to be.
if ((where == WHERE_AFTER
? in_tok->next : in_tok->previous) == arg_tok)
or something?
> +static void update_last(struct trailer_item **last)
> +{
> + if (*last)
> + while((*last)->next != NULL)
Style. SP between control keyword and the expression.
> + *last = (*last)->next;
> +}
> +
> +static void update_first(struct trailer_item **first)
> +{
> + if (*first)
> + while((*first)->previous != NULL)
Ditto.
> +static void process_trailers_lists(struct trailer_item **in_tok_first,
> ...
> + /* Process input from end to start */
> + for (in_tok = *in_tok_last; in_tok; in_tok = in_tok->previous) {
> + process_input_token(in_tok, arg_tok_first, WHERE_AFTER);
> + }
Needless brace pair.
> + /* Process input from start to end */
> + for (in_tok = *in_tok_first; in_tok; in_tok = in_tok->next) {
> + process_input_token(in_tok, arg_tok_first, WHERE_BEFORE);
> + }
Ditto.
next prev parent reply other threads:[~2014-03-05 22:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 19:47 [PATCH v6 00/11] Add interpret-trailers builtin Christian Couder
2014-03-04 19:47 ` [PATCH v6 01/11] Add data structures and basic functions for commit trailers Christian Couder
2014-03-04 19:48 ` [PATCH v6 02/11] trailer: process trailers from stdin and arguments Christian Couder
2014-03-05 22:52 ` Junio C Hamano [this message]
2014-03-07 6:19 ` Christian Couder
2014-03-07 8:08 ` Dan Carpenter
2014-03-07 12:41 ` Christian Couder
2014-03-04 19:48 ` [PATCH v6 03/11] trailer: read and process config information Christian Couder
2014-03-04 19:48 ` [PATCH v6 04/11] trailer: process command line trailer arguments Christian Couder
2014-03-05 22:55 ` Junio C Hamano
2014-03-04 19:48 ` [PATCH v6 05/11] trailer: parse trailers from stdin Christian Couder
2014-03-05 22:56 ` Junio C Hamano
2014-03-04 19:48 ` [PATCH v6 06/11] trailer: put all the processing together and print Christian Couder
2014-03-04 19:48 ` [PATCH v6 07/11] trailer: add interpret-trailers command Christian Couder
2014-03-04 19:48 ` [PATCH v6 08/11] trailer: add tests for "git interpret-trailers" Christian Couder
2014-03-05 22:59 ` Junio C Hamano
2014-03-04 19:48 ` [PATCH v6 09/11] trailer: execute command from 'trailer.<name>.command' Christian Couder
2014-03-05 22:57 ` Junio C Hamano
2014-03-04 19:48 ` [PATCH v6 10/11] trailer: add tests for commands in config file Christian Couder
2014-03-04 19:48 ` [PATCH v6 11/11] Documentation: add documentation for 'git interpret-trailers' Christian Couder
2014-03-06 1:18 ` [PATCH v6 00/11] Add interpret-trailers builtin Ramsay Jones
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=xmqqiors1cn4.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=chriscool@tuxfamily.org \
--cc=dan.carpenter@oracle.com \
--cc=git@vger.kernel.org \
--cc=greg@kroah.com \
--cc=johan@herland.net \
--cc=josh@joshtriplett.org \
--cc=mhagger@alum.mit.edu \
--cc=peff@peff.net \
--cc=sunshine@sunshineco.com \
--cc=tr@thomasrast.ch \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.