summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2023-04-10 10:34:20 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2023-04-10 14:21:16 +0100
commitb899fda3d88dc92f50e73544fb7524a1c3c70354 (patch)
tree30265a2efb5ac452ab85ddddf184d907cda4faad /include
parentbe484d355b1b41748689fd29381bdcdcbd4c45bb (diff)
downloadlibgit2-b899fda3d88dc92f50e73544fb7524a1c3c70354.tar.gz
commit graph: support sha256
Diffstat (limited to 'include')
-rw-r--r--include/git2/sys/commit_graph.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/git2/sys/commit_graph.h b/include/git2/sys/commit_graph.h
index 823c7ed57..06e045fcd 100644
--- a/include/git2/sys/commit_graph.h
+++ b/include/git2/sys/commit_graph.h
@@ -28,7 +28,13 @@ GIT_BEGIN_DECL
* @param objects_dir the path to a git objects directory.
* @return Zero on success; -1 on failure.
*/
-GIT_EXTERN(int) git_commit_graph_open(git_commit_graph **cgraph_out, const char *objects_dir);
+GIT_EXTERN(int) git_commit_graph_open(
+ git_commit_graph **cgraph_out,
+ const char *objects_dir
+#ifdef GIT_EXPERIMENTAL_SHA256
+ , git_oid_t oid_type
+#endif
+ );
/**
* Frees commit-graph data. This should only be called when memory allocated
@@ -50,7 +56,11 @@ GIT_EXTERN(void) git_commit_graph_free(git_commit_graph *cgraph);
*/
GIT_EXTERN(int) git_commit_graph_writer_new(
git_commit_graph_writer **out,
- const char *objects_info_dir);
+ const char *objects_info_dir
+#ifdef GIT_EXPERIMENTAL_SHA256
+ , git_oid_t oid_type
+#endif
+ );
/**
* Free the commit-graph writer and its resources.