diff options
author | barkalow@iabervon.org <barkalow@iabervon.org> | 2005-08-03 01:46:29 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-08-03 07:53:11 +0200 |
commit | 70b9829ea73931f7e2f23fbe5f1853e0dca5ca12 (patch) | |
tree | c740201e802d9723eb0d1606e778dbaab438bf2e /cache.h | |
parent | [PATCH] Parallelize the pull algorithm (diff) | |
download | git-70b9829ea73931f7e2f23fbe5f1853e0dca5ca12.tar.xz git-70b9829ea73931f7e2f23fbe5f1853e0dca5ca12.zip |
[PATCH] Parallelize pulling by ssh
This causes ssh-pull to request objects in prefetch() and read then in
fetch(), such that it reduces the unpipelined round-trip time.
This also makes sha1_write_from_fd() support having a buffer of data
which it accidentally read from the fd after the object; this was
formerly not a problem, because it would always get a short read at
the end of an object, because the next object had not been
requested. This is no longer true.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -198,7 +198,8 @@ extern int check_sha1_signature(const unsigned char *sha1, void *buf, unsigned l /* Read a tree into the cache */ extern int read_tree(void *buffer, unsigned long size, int stage, const char **paths); -extern int write_sha1_from_fd(const unsigned char *sha1, int fd); +extern int write_sha1_from_fd(const unsigned char *sha1, int fd, char *buffer, + size_t bufsize, size_t *bufposn); extern int write_sha1_to_fd(int fd, const unsigned char *sha1); extern int has_sha1_pack(const unsigned char *sha1); |