summaryrefslogtreecommitdiffstats
path: root/include/git2/repository.h
diff options
context:
space:
mode:
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