summaryrefslogtreecommitdiff
path: root/vcs-svn/svndump.c
diff options
context:
space:
mode:
authorDavid Barr <david.barr@cordelta.com>2010-12-14 00:06:43 (GMT)
committerJonathan Nieder <jrnieder@gmail.com>2011-03-22 23:09:05 (GMT)
commitf1602054e3a45e195edf814681e8f5ba88851623 (patch)
tree52c703e43b3f6cca29cc5586c54d38d0ff759318 /vcs-svn/svndump.c
parent90c0a3cfe390208c86144bf97ec8fa5610febe0f (diff)
downloadgit-f1602054e3a45e195edf814681e8f5ba88851623.zip
git-f1602054e3a45e195edf814681e8f5ba88851623.tar.gz
git-f1602054e3a45e195edf814681e8f5ba88851623.tar.bz2
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/svndump.c')
-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 77680a3..0919a57 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) {