aboutsummaryrefslogtreecommitdiff
path: root/pull.h
diff options
context:
space:
mode:
authorbarkalow@iabervon.org <barkalow@iabervon.org>2005-08-02 19:46:10 -0400
committerJunio C Hamano <junkio@cox.net>2005-08-02 22:53:09 -0700
commit1e8be59d14f36128e5eb12cc0457e676bb79690c (patch)
tree3fa313f2f2ce5e0958010d133e5434012d0033f2 /pull.h
parent66e481b007e843be54b9ff6a4be6e139c103a695 (diff)
downloadgit-1e8be59d14f36128e5eb12cc0457e676bb79690c.tar.gz
git-1e8be59d14f36128e5eb12cc0457e676bb79690c.tar.xz
[PATCH] Parallelize the pull algorithm
This processes objects in two simultaneous passes. Each object will first be given to prefetch(), as soon as it is possible to tell that it will be needed, and then will be given to fetch(), when it is the next object that needs to be parsed. Unless an implementation does something with prefetch(), this should have no effect. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'pull.h')
-rw-r--r--pull.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/pull.h b/pull.h
index e173ae333..e7710e89e 100644
--- a/pull.h
+++ b/pull.h
@@ -9,6 +9,13 @@
extern int fetch(unsigned char *sha1);
/*
+ * Fetch the specified object and store it locally; fetch() will be
+ * called later to determine success. To be provided by the particular
+ * implementation.
+ */
+extern void prefetch(unsigned char *sha1);
+
+/*
* Fetch ref (relative to $GIT_DIR/refs) from the remote, and store
* the 20-byte SHA1 in sha1. Return 0 on success, -1 on failure. To
* be provided by the particular implementation.