summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-04-25 14:29:45 -0700
committerVicent Martí <tanoku@gmail.com>2012-04-25 14:29:45 -0700
commitf50087c03b08230ba7d912e827a72e857128a7a8 (patch)
tree11461209d4ff23c8d4ae6c716c1473f4daec4695 /include/git2
parent19dd4e283370a3ccaf78e153fbf54c1830e44d3d (diff)
parentf184836bd281efe8a656e3a9c6c2f9c040b88119 (diff)
downloadlibgit2-f50087c03b08230ba7d912e827a72e857128a7a8.tar.gz
Merge pull request #641 from carlosmn/networking
More Networking updates
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/indexer.h2
-rw-r--r--include/git2/remote.h9
2 files changed, 5 insertions, 6 deletions
diff --git a/include/git2/indexer.h b/include/git2/indexer.h
index a70fab214..14bd0e402 100644
--- a/include/git2/indexer.h
+++ b/include/git2/indexer.h
@@ -41,7 +41,7 @@ GIT_EXTERN(int) git_indexer_stream_new(git_indexer_stream **out, const char *git
* @param size the size of the data
* @param stats stat storage
*/
-GIT_EXTERN(int) git_indexer_stream_add(git_indexer_stream *idx, void *data, size_t size, git_indexer_stats *stats);
+GIT_EXTERN(int) git_indexer_stream_add(git_indexer_stream *idx, const void *data, size_t size, git_indexer_stats *stats);
/**
* Finalize the pack and index
diff --git a/include/git2/remote.h b/include/git2/remote.h
index e6537ec52..09b927e28 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -11,6 +11,7 @@
#include "repository.h"
#include "refspec.h"
#include "net.h"
+#include "indexer.h"
/**
* @file git2/remote.h
@@ -150,7 +151,7 @@ GIT_EXTERN(int) git_remote_ls(git_remote *remote, git_headlist_cb list_cb, void
* @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);
+GIT_EXTERN(int) git_remote_download(git_remote *remote, git_off_t *bytes, git_indexer_stats *stats);
/**
* Check whether the remote is connected
@@ -182,12 +183,10 @@ GIT_EXTERN(void) git_remote_free(git_remote *remote);
/**
* Update the tips to the new state
*
- * Make sure that you only call this once you've successfully indexed
- * or expanded the packfile.
- *
* @param remote the remote to update
+ * @param cb callback to run on each ref update. 'a' is the old value, 'b' is then new value
*/
-GIT_EXTERN(int) git_remote_update_tips(git_remote *remote);
+GIT_EXTERN(int) git_remote_update_tips(git_remote *remote, int (*cb)(const char *refname, const git_oid *a, const git_oid *b));
/**
* Return whether a string is a valid remote URL