public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
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 05/11] trailer: parse trailers from stdin
Date: Wed, 05 Mar 2014 14:56:21 -0800	[thread overview]
Message-ID: <xmqq38iw1ch6.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: 20140304194810.14249.52031.chriscool@tuxfamily.org

Christian Couder <chriscool@tuxfamily•org> writes:

> diff --git a/trailer.c b/trailer.c
> index 5d69c00..e0e066f 100644
> --- a/trailer.c
> +++ b/trailer.c
> @@ -50,6 +50,13 @@ static size_t alnum_len(const char *buf, size_t len)
>  	return len;
>  }
>  
> +static inline int contains_only_spaces(const char *str)
> +{
> +	const char *s;
> +	for (s = str; *s && isspace(*s); s++);

Have an empty statement on a separate line for readability.  I.e.

	for (...)
        	; /* keep skipping */

> @@ -471,3 +478,72 @@ static struct trailer_item *process_command_line_args(int argc, const char **arg
> ...
> +static void process_stdin(struct trailer_item **in_tok_first,
> +			  struct trailer_item **in_tok_last)
> +{
> ...
> +	/* Print non trailer lines as is */
> +	for (i = 0; lines[i] && i < start; i++) {
> +		printf("%s", lines[i]->buf);
> +	}

Needless brace pair.

  reply	other threads:[~2014-03-05 22:56 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
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 [this message]
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=xmqq38iw1ch6.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=chriscool@tuxfamily$(echo .)org \
    --cc=dan.carpenter@oracle$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=greg@kroah$(echo .)com \
    --cc=johan@herland$(echo .)net \
    --cc=josh@joshtriplett$(echo .)org \
    --cc=mhagger@alum$(echo .)mit.edu \
    --cc=peff@peff$(echo .)net \
    --cc=sunshine@sunshineco$(echo .)com \
    --cc=tr@thomasrast$(echo .)ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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