Re: [PATCH v3] commit -v: strip diffs and submodule shortlogs from the commit message
Jens Lehmann <Jens.Lehmann@web.de> writes:
Show 10 quoted lines
> 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.