From: Jeff King Date: Sun, 17 Nov 2013 08:53:57 GMT Subject: Re: [RFC PATCH] commit -v: strip diffs and submodule shortlogs from the commit message Message-ID: <20131117085357.GB17016@sigill.intra.peff.net> In-Reply-To: On Sat, Nov 16, 2013 at 07:22:29PM -0500, Eric Sunshine wrote: > > /* 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