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