summaryrefslogtreecommitdiff
path: root/include/git2/remote.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2011-08-04 22:42:58 +0200
committerVicent Marti <tanoku@gmail.com>2011-08-18 02:34:08 +0200
commit48a65a071d9d6689a0ebb7891a20e8dab5fd3cdd (patch)
tree872610c01b47d1b47029bf465e7efb4658f45306 /include/git2/remote.h
parent9cf0f287bb0ece488c9e0a169b3f806a4a9701eb (diff)
downloadlibgit2-48a65a071d9d6689a0ebb7891a20e8dab5fd3cdd.tar.gz
Only wait for pack if we need it
Provide the git_remote_download function to instruct the library to downlad the packfile and let the user know the temporary location. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'include/git2/remote.h')
-rw-r--r--include/git2/remote.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index 207fe271d..74b0a05c6 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -121,6 +121,20 @@ GIT_EXTERN(int) git_remote_ls(git_remote *remote, git_headarray *refs);
GIT_EXTERN(int) git_remote_negotiate(git_remote *remote);
/**
+ * Download the packfile
+ *
+ * The packfile is downloaded with a temporary filename, as it's final
+ * name is not known yet. If there was no packfile needed (all the
+ * objects were available locally), filename will be NULL and the
+ * function will return success.
+ *
+ * @param remote the remote to download from
+ * @param filename where to store the temproray filename
+ * @return GIT_SUCCESS or an error code
+ */
+GIT_EXTERN(int) git_remote_download(char **filename, git_remote *remote);
+
+/**
* Free the memory associated with a remote
*
* @param remote the remote to free