summaryrefslogtreecommitdiffstats
path: root/include/git2/repository.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:03:06 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-21 05:03:06 +0000
commit4ffc4372dff6595a86120ec0bd311c4cb5fb8ed6 (patch)
tree582224c3f88627b5797d1b57ccaf158c7d36118e /include/git2/repository.h
parentReleasing progress-linux version 1.7.2+ds-1~progress7.99u1. (diff)
downloadlibgit2-4ffc4372dff6595a86120ec0bd311c4cb5fb8ed6.tar.xz
libgit2-4ffc4372dff6595a86120ec0bd311c4cb5fb8ed6.zip
Merging upstream version 1.8.1+ds.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/git2/repository.h')
-rw-r--r--include/git2/repository.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/git2/repository.h b/include/git2/repository.h
index 6ec2ac8..0afda72 100644
--- a/include/git2/repository.h
+++ b/include/git2/repository.h
@@ -11,6 +11,7 @@
#include "types.h"
#include "oid.h"
#include "buffer.h"
+#include "commit.h"
/**
* @file git2/repository.h
@@ -503,6 +504,7 @@ typedef enum {
GIT_REPOSITORY_ITEM_LOGS,
GIT_REPOSITORY_ITEM_MODULES,
GIT_REPOSITORY_ITEM_WORKTREES,
+ GIT_REPOSITORY_ITEM_WORKTREE_CONFIG,
GIT_REPOSITORY_ITEM__LAST
} git_repository_item_t;
@@ -978,6 +980,17 @@ GIT_EXTERN(int) git_repository_set_ident(git_repository *repo, const char *name,
*/
GIT_EXTERN(git_oid_t) git_repository_oid_type(git_repository *repo);
+/**
+ * Gets the parents of the next commit, given the current repository state.
+ * Generally, this is the HEAD commit, except when performing a merge, in
+ * which case it is two or more commits.
+ *
+ * @param commits a `git_commitarray` that will contain the commit parents
+ * @param repo the repository
+ * @return 0 or an error code
+ */
+GIT_EXTERN(int) git_repository_commit_parents(git_commitarray *commits, git_repository *repo);
+
/** @} */
GIT_END_DECL
#endif