vcs-svn: use strchr to find RFC822 delimiter

This is a small optimisation (4% reduction in user time) but is the
largest artifact within the parsing portion of svndump.c

Signed-off-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
This commit is contained in:
David Barr 2010-12-14 11:06:43 +11:00 committed by Jonathan Nieder
parent 90c0a3cfe3
commit f1602054e3

View File

@ -297,10 +297,13 @@ void svndump_read(const char *url)
reset_dump_ctx(pool_intern(url));
while ((t = buffer_read_line(&input))) {
val = strstr(t, ": ");
val = strchr(t, ':');
if (!val)
continue;
val += 2;
val++;
if (*val != ' ')
continue;
val++;
/* strlen(key) + 1 */
switch (val - t - 1) {