summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-04-13 20:41:06 +0200
committerVicent Martí <tanoku@gmail.com>2012-04-13 20:41:06 +0200
commitd1f331564da9d6110b80b538a501da0c66e59142 (patch)
tree9104d99cb3cafcdf7142ba14d5fe6380c42ccdea /include/git2
parentfcb2164ff1a0ab0eab22e08cefa87880590bdbbf (diff)
parenteb8117b841f22063ba8fe27653cac79957c548ea (diff)
downloadlibgit2-d1f331564da9d6110b80b538a501da0c66e59142.tar.gz
Merge remote-tracking branch 'carlosmn/revwalk-merge-base' into new-error-handling
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/merge.h35
-rw-r--r--include/git2/revwalk.h22
2 files changed, 57 insertions, 0 deletions
diff --git a/include/git2/merge.h b/include/git2/merge.h
new file mode 100644
index 000000000..5a0b2e7f2
--- /dev/null
+++ b/include/git2/merge.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2009-2012 the libgit2 contributors
+ *
+ * This file is part of libgit2, distributed under the GNU GPL v2 with
+ * a Linking Exception. For full terms see the included COPYING file.
+ */
+#ifndef INCLUDE_git_merge_h__
+#define INCLUDE_git_merge_h__
+
+#include "common.h"
+#include "types.h"
+#include "oid.h"
+
+/**
+ * @file git2/merge.h
+ * @brief Git merge-base routines
+ * @defgroup git_revwalk Git merge-base routines
+ * @ingroup Git
+ * @{
+ */
+GIT_BEGIN_DECL
+
+/**
+ * Find a merge base between two commits
+ *
+ * @param out the OID of a merge base between 'one' and 'two'
+ * @param repo the repository where the commits exist
+ * @param one one of the commits
+ * @param two the other commit
+ */
+GIT_EXTERN(int) git_merge_base(git_oid *out, git_repository *repo, git_oid *one, git_oid *two);
+
+/** @} */
+GIT_END_DECL
+#endif
diff --git a/include/git2/revwalk.h b/include/git2/revwalk.h
index e7ec2abf3..632c67588 100644
--- a/include/git2/revwalk.h
+++ b/include/git2/revwalk.h
@@ -164,6 +164,28 @@ GIT_EXTERN(int) git_revwalk_hide_glob(git_revwalk *walk, const char *glob);
GIT_EXTERN(int) git_revwalk_hide_head(git_revwalk *walk);
/**
+ * Push the OID pointed to by a reference
+ *
+ * The reference must point to a commit.
+ *
+ * @param walk the walker being used for the traversal
+ * @param refname the referece to push
+ * @return GIT_SUCCESS or an error code
+ */
+GIT_EXTERN(int) git_revwalk_push_ref(git_revwalk *walk, const char *refname);
+
+/**
+ * Hide the OID pointed to by a reference
+ *
+ * The reference must point to a commit.
+ *
+ * @param walk the walker being used for the traversal
+ * @param refname the referece to hide
+ * @return GIT_SUCCESS or an error code
+ */
+GIT_EXTERN(int) git_revwalk_hide_ref(git_revwalk *walk, const char *refname);
+
+/**
* Get the next commit from the revision walk.
*
* The initial call to this method is *not* blocking when