summaryrefslogtreecommitdiff
path: root/include/git2/indexer.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-03-29 17:49:57 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-04-13 22:19:44 +0200
commit3f93e16cff90e71dad434729b3acdc437fb06436 (patch)
tree57e0986303d9258193e2b01349048589cca79f48 /include/git2/indexer.h
parentfa679339c433cf7b478f9badd37ec9e093a3f0af (diff)
downloadlibgit2-3f93e16cff90e71dad434729b3acdc437fb06436.tar.gz
indexer: start writing the stream indexer
This will allow us to index a packfile as soon as we receive it from the network as well as storing it with its final name so we don't need to pass temporary file names around.
Diffstat (limited to 'include/git2/indexer.h')
-rw-r--r--include/git2/indexer.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/git2/indexer.h b/include/git2/indexer.h
index 7f336f8e..76b162ed 100644
--- a/include/git2/indexer.h
+++ b/include/git2/indexer.h
@@ -23,6 +23,25 @@ typedef struct git_indexer_stats {
typedef struct git_indexer git_indexer;
+typedef struct git_indexer_stream git_indexer_stream;
+
+/**
+ * Create a new streaming indexer instance
+ *
+ * @param out where to store the inexer instance
+ * @param path to the gitdir (metadata directory)
+ */
+GIT_EXTERN(int) git_indexer_stream_new(git_indexer_stream **out, const char *gitdir);
+
+/**
+ * Add data to the indexer
+ *
+ * @param idx the indexer
+ * @param data the data to add
+ * @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);
/**
* Create a new indexer instance