diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2021-07-26 16:27:54 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-26 16:27:54 -0400 |
| commit | 2370e4910262f941a3bb0f70ce05ff7a90679fe1 (patch) | |
| tree | 1d3b183d7b14ab3bf4a2d3b11ead833ef073a825 /include/git2/odb.h | |
| parent | 43b5075df4c543fc8801ed4b829702d7f9f2c0ad (diff) | |
| parent | 25b75cd9bc01896a2b74c748ceef7110ea1b165f (diff) | |
| download | libgit2-2370e4910262f941a3bb0f70ce05ff7a90679fe1.tar.gz | |
Merge pull request #5765 from lhchavez/cgraph-revwalks
commit-graph: Use the commit-graph in revwalks
Diffstat (limited to 'include/git2/odb.h')
| -rw-r--r-- | include/git2/odb.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/git2/odb.h b/include/git2/odb.h index 62100d56a..702e1bd30 100644 --- a/include/git2/odb.h +++ b/include/git2/odb.h @@ -539,6 +539,21 @@ GIT_EXTERN(size_t) git_odb_num_backends(git_odb *odb); */ GIT_EXTERN(int) git_odb_get_backend(git_odb_backend **out, git_odb *odb, size_t pos); +/** + * Set the git commit-graph for the ODB. + * + * After a successfull call, the ownership of the cgraph parameter will be + * transferred to libgit2, and the caller should not free it. + * + * The commit-graph can also be unset by explicitly passing NULL as the cgraph + * parameter. + * + * @param odb object database + * @param cgraph the git commit-graph + * @return 0 on success; error code otherwise + */ +GIT_EXTERN(int) git_odb_set_commit_graph(git_odb *odb, git_commit_graph *cgraph); + /** @} */ GIT_END_DECL #endif |
