Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
vcs-svn: use strchr to find RFC822 delimiter
author
David Barr
<david.barr@cordelta.com>
Tue, 14 Dec 2010 00:06:43 +0000
(11:06 +1100)
committer
Jonathan Nieder
<jrnieder@gmail.com>
Tue, 22 Mar 2011 23:09:05 +0000
(18:09 -0500)
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>
vcs-svn/svndump.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
90c0a3c
)
diff --git
a/vcs-svn/svndump.c
b/vcs-svn/svndump.c
index 77680a31e8fed797715bc7c6727082574951ad0c..0919a576dc7dd0a129dbc0f9bb49547edb8e9fe8 100644
(file)
--- 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 = str
str(t, ": "
);
+ val = str
chr(t, ':'
);
if (!val)
continue;
- val += 2;
+ val++;
+ if (*val != ' ')
+ continue;
+ val++;
/* strlen(key) + 1 */
switch (val - t - 1) {