summaryrefslogtreecommitdiff
path: root/vcs-svn
diff options
context:
space:
mode:
authorDavid Barr <david.barr@cordelta.com>2010-12-14 11:06:43 +1100
committerJonathan Nieder <jrnieder@gmail.com>2011-03-22 18:09:05 -0500
commitf1602054e3a45e195edf814681e8f5ba88851623 (patch)
tree52c703e43b3f6cca29cc5586c54d38d0ff759318 /vcs-svn
parent90c0a3cfe390208c86144bf97ec8fa5610febe0f (diff)
downloadgit-f1602054e3a45e195edf814681e8f5ba88851623.tar.gz
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>
Diffstat (limited to 'vcs-svn')
-rw-r--r--vcs-svn/svndump.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c
index 77680a31e8..0919a576dc 100644
--- a/vcs-svn/svndump.c
+++ b/vcs-svn/svndump.c
@@ -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) {