summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2023-05-05 16:29:58 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2023-05-06 14:33:49 +0100
commit161d8a12e70936222a55b5571098299957cdee04 (patch)
tree0498bfeedcb14fee66cbfffaa2c320b718f6ed23 /include
parentf1ef8ebee3ee21afba3ad1ad1335d34371a61d05 (diff)
downloadlibgit2-161d8a12e70936222a55b5571098299957cdee04.tar.gz
sha256: wrap_odb supports SHA256
Diffstat (limited to 'include')
-rw-r--r--include/git2/repository.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/git2/repository.h b/include/git2/repository.h
index 560e70ab6..6ec2ac822 100644
--- a/include/git2/repository.h
+++ b/include/git2/repository.h
@@ -56,9 +56,19 @@ GIT_EXTERN(int) git_repository_open_from_worktree(git_repository **out, git_work
*
* @param out pointer to the repo
* @param odb the object database to wrap
+ * @param oid_type the oid type of the object database
* @return 0 or an error code
*/
-GIT_EXTERN(int) git_repository_wrap_odb(git_repository **out, git_odb *odb);
+#ifdef GIT_EXPERIMENTAL_SHA256
+GIT_EXTERN(int) git_repository_wrap_odb(
+ git_repository **out,
+ git_odb *odb,
+ git_oid_t oid_type);
+#else
+GIT_EXTERN(int) git_repository_wrap_odb(
+ git_repository **out,
+ git_odb *odb);
+#endif
/**
* Look for a git repository and copy its path in the given buffer.
@@ -536,7 +546,7 @@ GIT_EXTERN(const char *) git_repository_workdir(const git_repository *repo);
/**
* Get the path of the shared common directory for this repository.
- *
+ *
* If the repository is bare, it is the root directory for the repository.
* If the repository is a worktree, it is the parent repo's gitdir.
* Otherwise, it is the gitdir.