summaryrefslogtreecommitdiff
path: root/src/libgit2/index.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libgit2/index.h')
-rw-r--r--src/libgit2/index.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/libgit2/index.h b/src/libgit2/index.h
index 71bb096f7..53c29977d 100644
--- a/src/libgit2/index.h
+++ b/src/libgit2/index.h
@@ -27,7 +27,7 @@ struct git_index {
char *index_file_path;
git_futils_filestamp stamp;
- unsigned char checksum[GIT_HASH_SHA1_SIZE];
+ unsigned char checksum[GIT_HASH_MAX_SIZE];
git_vector entries;
git_idxmap *entries_map;
@@ -35,6 +35,8 @@ struct git_index {
git_vector deleted; /* deleted entries if readers > 0 */
git_atomic32 readers; /* number of active iterators */
+ git_oid_t oid_type;
+
unsigned int on_disk:1;
unsigned int ignore_case:1;
unsigned int distrust_filemode:1;
@@ -141,6 +143,17 @@ GIT_INLINE(unsigned char *) git_index__checksum(git_index *index)
return index->checksum;
}
+/* SHA256-aware internal functions */
+
+extern int git_index__new(
+ git_index **index_out,
+ git_oid_t oid_type);
+
+extern int git_index__open(
+ git_index **index_out,
+ const char *index_path,
+ git_oid_t oid_type);
+
/* Copy the current entries vector *and* increment the index refcount.
* Call `git_index__release_snapshot` when done.
*/