diff options
| author | Greg Price <price@mit.edu> | 2013-03-20 10:01:58 -0700 |
|---|---|---|
| committer | Greg Price <price@mit.edu> | 2013-04-06 20:51:16 -0700 |
| commit | b208d9002289dcd8170750cb94c84678afdd6e0c (patch) | |
| tree | 58ef967f39273c9439e381f15c4e309108fde098 /include/git2/revparse.h | |
| parent | 2932c8826a1d948565124aa6c9a32df68a15895b (diff) | |
| download | libgit2-b208d9002289dcd8170750cb94c84678afdd6e0c.tar.gz | |
revparse: Parse range-like syntax
Signed-off-by: Greg Price <price@mit.edu>
Diffstat (limited to 'include/git2/revparse.h')
| -rw-r--r-- | include/git2/revparse.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/git2/revparse.h b/include/git2/revparse.h index 6edb7767c..edd8b3cce 100644 --- a/include/git2/revparse.h +++ b/include/git2/revparse.h @@ -32,6 +32,19 @@ GIT_BEGIN_DECL */ GIT_EXTERN(int) git_revparse_single(git_object **out, git_repository *repo, const char *spec); +/** + * Parse a string with the form of a revision range, as accepted by + * `git rev-list`, `git diff`, and others. + * + * @param left (output) the left-hand commit + * @param right (output) the right-hand commit + * @param threedots (output) 0 if the endpoints are separated by two dots, 1 if by three + * @param repo the repository to find the commits in + * @param rangelike the rangelike string to be parsed + * @return 0 on success, or any error `git_revparse_single` can return + */ +GIT_EXTERN(int) git_revparse_rangelike(git_object **left, git_object **right, int *threedots, git_repository *repo, const char *rangelike); + /** @} */ GIT_END_DECL #endif |
