From 70b9829ea73931f7e2f23fbe5f1853e0dca5ca12 Mon Sep 17 00:00:00 2001 From: "barkalow@iabervon.org" Date: Tue, 2 Aug 2005 19:46:29 -0400 Subject: [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 Signed-off-by: Junio C Hamano --- cache.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cache.h') diff --git a/cache.h b/cache.h index 381db3584e..1b49f0f4c3 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); -- cgit v1.2.3