Re: [PATCH] remove "[PATCH]" prefix from shortlog output
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Dec 10, 2006, 22:40 UTC
- Message-ID
- <Pine.LNX.4.63.0612102337090.28348@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <Pine.LNX.4.64.0612091954010.2630@xanadu.home>
Hi,
On Sat, 9 Dec 2006, Nicolas Pitre wrote:
> This doesn't convey much information in the shortlog context. > And the perl version did strip it as well.
From the current builtin-shortlog.c:128ff:
if (!strncmp(oneline, "[PATCH", 6)) {
char *eob = strchr(oneline, ']'); if (eob) {
while (isspace(eob[1]) && eob[1] != '\n')
eob++;
if (eob - oneline < onelinelen) {
onelinelen -= eob - oneline;
oneline = eob;
}
}
}It tries not only to strip "[PATCH]", but also "[PATCH 0/n]" and basically every prefix beginning with "[PATCH" and ending in "]". I do not remember if I really tested that code, but it should work.
Ciao, Dscho