summaryrefslogtreecommitdiff
path: root/include/git2/odb.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2022-01-26 13:57:48 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2022-06-20 17:09:46 -0400
commitdbccfc203e776196ea2901dbcb652bba6a848a30 (patch)
tree1261d2fcb2429a783aa6da43712133bb334fe093 /include/git2/odb.h
parent3eba9181cf74693d5906c799e08aba15b5745355 (diff)
downloadlibgit2-dbccfc203e776196ea2901dbcb652bba6a848a30.tar.gz
odb: accept an oid type in options
Allow the object database to take an oid type that it supports. This oid type will be used to validate the objects that the backends provide.
Diffstat (limited to 'include/git2/odb.h')
-rw-r--r--include/git2/odb.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/git2/odb.h b/include/git2/odb.h
index 12b5fc730..0952a1be0 100644
--- a/include/git2/odb.h
+++ b/include/git2/odb.h
@@ -41,6 +41,12 @@ typedef int GIT_CALLBACK(git_odb_foreach_cb)(const git_oid *id, void *payload);
/** Options for configuring a loose object backend. */
typedef struct {
unsigned int version; /**< version for the struct */
+
+ /**
+ * Type of object IDs to use for this object database, or
+ * 0 for default (currently SHA1).
+ */
+ git_oid_t oid_type;
} git_odb_options;
/* The current version of the diff options structure */