summaryrefslogtreecommitdiff
path: root/include/git2/revwalk.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-02-28 02:19:57 +0100
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-04-12 20:25:24 +0200
commit06b9d915901b3dd9dc85016bb000e631eb1da1d7 (patch)
treec9a2984955e959cd5b4ca44809fa4e68f92d9f93 /include/git2/revwalk.h
parent081d229106faae3c37c08940fd510a3511bfbd59 (diff)
downloadlibgit2-06b9d915901b3dd9dc85016bb000e631eb1da1d7.tar.gz
revwalk: allow pushing/hiding a reference by name
The code was already there, so factor it out and let users push an OID by giving it a reference name. Only refs to commits are supported. Annotated tags will throw an error.
Diffstat (limited to 'include/git2/revwalk.h')
-rw-r--r--include/git2/revwalk.h22
1 files changed, 22 insertions, 0 deletions
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