From: Junio C Hamano Date: Thu, 21 Nov 2013 22:23:17 GMT Subject: Re: [PATCH v3] commit -v: strip diffs and submodule shortlogs from the commit message Message-ID: In-Reply-To: <528E7A6E.8080603@web.de> Jens Lehmann 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.