Re: [RFC PATCH] commit -v: strip diffs and submodule shortlogs from the commit message
- From
Jeff King <peff@peff.net>
- Date
- Nov 17, 2013, 08:53 UTC
- Message-ID
- <20131117085357.GB17016@sigill.intra.peff.net>
- In-Reply-To
- <CAPig+cTiwA7wg2eeCcfw8d=-+_QoxGiWVq9sABNdUTCka=5fbg@mail.gmail.com>
On Sat, Nov 16, 2013 at 07:22:29PM -0500, Eric Sunshine wrote:
Show 9 quoted lines
> > /* Truncate the message just before the diff, if any. */
> > if (verbose) {
> > - p = strstr(sb.buf, "\ndiff --git ");
> > - if (p != NULL)
> > - strbuf_setlen(&sb, p - sb.buf + 1);
> > + p = strstr(sb.buf, wt_status_diff_divider);
>
> Would it make sense to use the more flexible is_scissors_line() from
> builtin/mailinfo.c here?I don't think so. We are not trying to be friendly to a remote source which has given us an arbitrarily-written scissor line. Rather the opposite: we are trying to be very strict only to break on the line we have included ourselves.
-Peff