summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-04-13 19:25:06 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-04-13 22:19:45 +0200
commit1c9c081a6a0e02ea8a148717083e3f7a769c5a2e (patch)
treece0404684becd4903233d8f0abd3a9a5af7c3c98 /include
parent907ebe855602bcbed2bf1bb55647b4c1767614ba (diff)
downloadlibgit2-1c9c081a6a0e02ea8a148717083e3f7a769c5a2e.tar.gz
indexer: add git_indexer_stream_free() and _hash()
Diffstat (limited to 'include')
-rw-r--r--include/git2/indexer.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/git2/indexer.h b/include/git2/indexer.h
index 8490ef0c8..a70fab214 100644
--- a/include/git2/indexer.h
+++ b/include/git2/indexer.h
@@ -53,6 +53,23 @@ GIT_EXTERN(int) git_indexer_stream_add(git_indexer_stream *idx, void *data, size
GIT_EXTERN(int) git_indexer_stream_finalize(git_indexer_stream *idx, git_indexer_stats *stats);
/**
+ * Get the packfile's hash
+ *
+ * A packfile's name is derived from the sorted hashing of all object
+ * names. This is only correct after the index has been finalized.
+ *
+ * @param idx the indexer instance
+ */
+GIT_EXTERN(const git_oid *) git_indexer_stream_hash(git_indexer_stream *idx);
+
+/**
+ * Free the indexer and its resources
+ *
+ * @param idx the indexer to free
+ */
+GIT_EXTERN(void) git_indexer_stream_free(git_indexer_stream *idx);
+
+/**
* Create a new indexer instance
*
* @param out where to store the indexer instance