summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorbarkalow@iabervon.org <barkalow@iabervon.org>2005-08-02 23:46:29 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-08-03 05:53:11 (GMT)
commit70b9829ea73931f7e2f23fbe5f1853e0dca5ca12 (patch)
treec740201e802d9723eb0d1606e778dbaab438bf2e /cache.h
parent1e8be59d14f36128e5eb12cc0457e676bb79690c (diff)
downloadgit-70b9829ea73931f7e2f23fbe5f1853e0dca5ca12.zip
git-70b9829ea73931f7e2f23fbe5f1853e0dca5ca12.tar.gz
git-70b9829ea73931f7e2f23fbe5f1853e0dca5ca12.tar.bz2
[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.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 381db35..1b49f0f 100644
--- a/cache.h
+++ b/cache.h
@@ -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);