summaryrefslogtreecommitdiff
path: root/include/git2/indexer.h
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2012-10-17 14:02:24 -0700
committerBen Straub <bs@github.com>2012-10-19 19:36:22 -0700
commit216863c48fd05b08e9b0083d61dcb163a2add62a (patch)
tree783430092fa565740a2a42c3b761da13a65c8d52 /include/git2/indexer.h
parent0ae81fc479bf3cf7ed31b3e3b070de7990102f1d (diff)
downloadlibgit2-216863c48fd05b08e9b0083d61dcb163a2add62a.tar.gz
Fetch/indexer: progress callbacks
Diffstat (limited to 'include/git2/indexer.h')
-rw-r--r--include/git2/indexer.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/git2/indexer.h b/include/git2/indexer.h
index 87f48fe27..0d3c9dd51 100644
--- a/include/git2/indexer.h
+++ b/include/git2/indexer.h
@@ -23,6 +23,11 @@ typedef struct git_indexer_stats {
} git_indexer_stats;
+/**
+ * Type for progress callbacks during indexing
+ */
+typedef void (*git_indexer_progress_callback)(const git_indexer_stats *stats, void *payload);
+
typedef struct git_indexer git_indexer;
typedef struct git_indexer_stream git_indexer_stream;
@@ -31,8 +36,14 @@ typedef struct git_indexer_stream git_indexer_stream;
*
* @param out where to store the indexer instance
* @param path to the directory where the packfile should be stored
+ * @param progress_cb function to call with progress information
+ * @param progress_payload payload for the progress callback
*/
-GIT_EXTERN(int) git_indexer_stream_new(git_indexer_stream **out, const char *path);
+GIT_EXTERN(int) git_indexer_stream_new(
+ git_indexer_stream **out,
+ const char *path,
+ git_indexer_progress_callback progress_cb,
+ void *progress_callback_payload);
/**
* Add data to the indexer