Re: [PATCH v2] builtin-commit: Include the diff in the commit message when verbose.

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

 



Hi,

On Wed, 21 Nov 2007, Kristian Høgsberg wrote:

> @@ -758,6 +758,12 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
>  		rollback_index_files();
>  		exit(1);
>  	}
> +
> +	/* Truncate the message just before the diff, if any. */
> +	p = strstr(sb.buf, "\ndiff --git a/");
> +	if (p != NULL)
> +		strbuf_setlen(&sb, p - sb.buf);
> +

Is this related to the change in wt_status?  If so, wouldn't we want to 
suppress the diff, instead of generating it, and then killing it later?

Besides, you'd want to leave the \n there: strbuf_setlen(&sb, p + 1 - 
sb.buf);

> +	/* Sigh, the entire diff machinery is hardcoded to output to
> +	 * stdout.  Do the dup-dance...*/

I wonder how much effort it would be to change that.  Not that it would 
help too much, since we want the output in a strbuf anyway.

Ciao,
Dscho

[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