Re: [PATCH] shortlog: take the first populated line of the description

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, 5 Mar 2008, Andy Whitcroft wrote:

> diff --git a/builtin-shortlog.c b/builtin-shortlog.c
> index af31aba..b22b0ed 100644
> --- a/builtin-shortlog.c
> +++ b/builtin-shortlog.c
> @@ -70,11 +70,12 @@ static void insert_one_record(struct shortlog *log,
>  	else
>  		free(buffer);
>  
> +	/* Skip any leading whitespace, including any blank lines. */
> +	while (*oneline && isspace(*oneline))
> +		oneline++;
>  	eol = strchr(oneline, '\n');
>  	if (!eol)
>  		eol = oneline + strlen(oneline);
> -	while (*oneline && isspace(*oneline) && *oneline != '\n')
> -		oneline++;
>  	if (!prefixcmp(oneline, "[PATCH")) {
>  		char *eob = strchr(oneline, ']');
>  		if (eob && (!eol || eob < eol))

Why do you move the code around?  Makes it harder to read your patch.  
Besides, you now strip empty lines at the beginning of the commit 
messages, right?  Who produces such a thing?

Ciao,
Dscho

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux