Re: [PATCH v3] commit -v: strip diffs and submodule shortlogs from the commit message

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

 



Jens Lehmann <Jens.Lehmann@xxxxxx> writes:

> But what about this:
>
> 	struct strbuf cut_line = STRBUF_INIT;
> 	strbuf_addf(&cut_line, "%c %s", comment_line_char, wt_status_cut_line);
> 	p = strstr(buf->buf, cut_line.buf);
> 	if (p && (p == buf->buf || p[-1] == '\n'))
> 		strbuf_setlen(buf, p - buf->buf);
> 	strbuf_release(&cut_line);
>
> That is shorter can easily be adapted to a comment line string later.

Sure, that would work fine.

Thanks.
--
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]