Re: [PATCH] remove "[PATCH]" prefix from shortlog output

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Johannes Schindelin
Date: Sunday, December 10, 2006 - 3:40 pm

Hi,

On Sat, 9 Dec 2006, Nicolas Pitre wrote:


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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] remove "[PATCH]" prefix from shortlog output, Johannes Schindelin, (Sun Dec 10, 3:40 pm)
Re: [PATCH] remove &quot;[PATCH]&quot; prefix from shortlog output, Johannes Schindelin, (Sun Dec 10, 4:41 pm)