Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/revwalk.h')
-rw-r--r--include/git2/revwalk.h49
1 files changed, 32 insertions, 17 deletions
diff --git a/include/git2/revwalk.h b/include/git2/revwalk.h
index aac6fb7c2..8bfe0b502 100644
--- a/include/git2/revwalk.h
+++ b/include/git2/revwalk.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009-2012 the libgit2 contributors
+ * Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
@@ -63,11 +63,11 @@ GIT_BEGIN_DECL
* it is possible to have several revision walkers in
* several different threads walking the same repository.
*
- * @param walker pointer to the new revision walker
+ * @param out pointer to the new revision walker
* @param repo the repo to walk through
* @return 0 or an error code
*/
-GIT_EXTERN(int) git_revwalk_new(git_revwalk **walker, git_repository *repo);
+GIT_EXTERN(int) git_revwalk_new(git_revwalk **out, git_repository *repo);
/**
* Reset the revision walker for reuse.
@@ -92,22 +92,22 @@ GIT_EXTERN(void) git_revwalk_reset(git_revwalk *walker);
*
* The given commit will be used as one of the roots
* when starting the revision walk. At least one commit
- * must be pushed the repository before a walk can
+ * must be pushed onto the walker before a walk can
* be started.
*
* @param walk the walker being used for the traversal.
- * @param oid the oid of the commit to start from.
+ * @param id the oid of the commit to start from.
* @return 0 or an error code
*/
-GIT_EXTERN(int) git_revwalk_push(git_revwalk *walk, const git_oid *oid);
+GIT_EXTERN(int) git_revwalk_push(git_revwalk *walk, const git_oid *id);
/**
* Push matching references
*
- * The OIDs pinted to by the references that match the given glob
+ * The OIDs pointed to by the references that match the given glob
* pattern will be pushed to the revision walker.
*
- * A leading 'refs/' is implied it not present as well as a trailing
+ * A leading 'refs/' is implied if not present as well as a trailing
* '/ *' if the glob lacks '?', '*' or '['.
*
* @param walk the walker being used for the traversal
@@ -134,19 +134,19 @@ GIT_EXTERN(int) git_revwalk_push_head(git_revwalk *walk);
* output on the revision walk.
*
* @param walk the walker being used for the traversal.
- * @param oid the oid of commit that will be ignored during the traversal
+ * @param commit_id the oid of commit that will be ignored during the traversal
* @return 0 or an error code
*/
-GIT_EXTERN(int) git_revwalk_hide(git_revwalk *walk, const git_oid *oid);
+GIT_EXTERN(int) git_revwalk_hide(git_revwalk *walk, const git_oid *commit_id);
/**
* Hide matching references.
*
- * The OIDs pinted to by the references that match the given glob
+ * The OIDs pointed to by the references that match the given glob
* pattern and their ancestors will be hidden from the output on the
* revision walk.
*
- * A leading 'refs/' is implied it not present as well as a trailing
+ * A leading 'refs/' is implied if not present as well as a trailing
* '/ *' if the glob lacks '?', '*' or '['.
*
* @param walk the walker being used for the traversal
@@ -169,7 +169,7 @@ GIT_EXTERN(int) git_revwalk_hide_head(git_revwalk *walk);
* The reference must point to a commit.
*
* @param walk the walker being used for the traversal
- * @param refname the referece to push
+ * @param refname the reference to push
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_push_ref(git_revwalk *walk, const char *refname);
@@ -180,7 +180,7 @@ GIT_EXTERN(int) git_revwalk_push_ref(git_revwalk *walk, const char *refname);
* The reference must point to a commit.
*
* @param walk the walker being used for the traversal
- * @param refname the referece to hide
+ * @param refname the reference to hide
* @return 0 or an error code
*/
GIT_EXTERN(int) git_revwalk_hide_ref(git_revwalk *walk, const char *refname);
@@ -198,12 +198,12 @@ GIT_EXTERN(int) git_revwalk_hide_ref(git_revwalk *walk, const char *refname);
*
* The revision walker is reset when the walk is over.
*
- * @param oid Pointer where to store the oid of the next commit
+ * @param out Pointer where to store the oid of the next commit
* @param walk the walker to pop the commit from.
* @return 0 if the next commit was found;
- * GIT_REVWALKOVER if there are no commits left to iterate
+ * GIT_ITEROVER if there are no commits left to iterate
*/
-GIT_EXTERN(int) git_revwalk_next(git_oid *oid, git_revwalk *walk);
+GIT_EXTERN(int) git_revwalk_next(git_oid *out, git_revwalk *walk);
/**
* Change the sorting mode when iterating through the
@@ -217,6 +217,21 @@ GIT_EXTERN(int) git_revwalk_next(git_oid *oid, git_revwalk *walk);
GIT_EXTERN(void) git_revwalk_sorting(git_revwalk *walk, unsigned int sort_mode);
/**
+ * Push and hide the respective endpoints of the given range.
+ *
+ * The range should be of the form
+ * <commit>..<commit>
+ * where each <commit> is in the form accepted by 'git_revparse_single'.
+ * The left-hand commit will be hidden and the right-hand commit pushed.
+ *
+ * @param walk the walker being used for the traversal
+ * @param range the range
+ * @return 0 or an error code
+ *
+ */
+GIT_EXTERN(int) git_revwalk_push_range(git_revwalk *walk, const char *range);
+
+/**
* Free a revision walker previously allocated.
*
* @param walk traversal handle to close. If NULL nothing occurs.