From: Junio C Hamano <gitster@pobox•com>
To: Jens Lehmann <Jens.Lehmann@web•de>
Cc: Git Mailing List <git@vger•kernel.org>, Jeff King <peff@peff•net>,
Johannes Sixt <j6t@kdbg•org>, Ari Pollak <ari@debian•org>,
Ramsay Jones <ramsay@ramsay1•demon.co.uk>
Subject: Re: [PATCH v3] commit -v: strip diffs and submodule shortlogs from the commit message
Date: Thu, 21 Nov 2013 14:23:17 -0800 [thread overview]
Message-ID: <xmqqsiup2y3u.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <528E7A6E.8080603@web.de> (Jens Lehmann's message of "Thu, 21 Nov 2013 22:26:06 +0100")
Jens Lehmann <Jens.Lehmann@web•de> 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.
next prev parent reply other threads:[~2013-11-21 22:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-20 22:31 [PATCH v3] commit -v: strip diffs and submodule shortlogs from the commit message Jens Lehmann
2013-11-20 23:04 ` Junio C Hamano
2013-11-21 21:26 ` Jens Lehmann
2013-11-21 22:23 ` Junio C Hamano [this message]
2013-12-05 19:44 ` [PATCH v4] " Jens Lehmann
2013-12-05 20:05 ` Junio C Hamano
2013-12-05 23:10 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqsiup2y3u.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=Jens.Lehmann@web$(echo .)de \
--cc=ari@debian$(echo .)org \
--cc=git@vger$(echo .)kernel.org \
--cc=j6t@kdbg$(echo .)org \
--cc=peff@peff$(echo .)net \
--cc=ramsay@ramsay1$(echo .)demon.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox