diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2015-03-17 10:21:28 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2015-03-17 10:21:28 -0400 |
| commit | 9bbc8f350b80a5a6e94651ec667cf9e5d545b317 (patch) | |
| tree | a472cf837ffc1dbe7ddb81be0a773ca74f27b7f0 /include/git2/annotated_commit.h | |
| parent | 7800048afbb002d0003b54fcc09c98d0d3249949 (diff) | |
| parent | 8acf058ff708582e9bbfe04e297d3b17a4d5c2e8 (diff) | |
| download | libgit2-9bbc8f350b80a5a6e94651ec667cf9e5d545b317.tar.gz | |
Merge pull request #2962 from libgit2/cmn/reflog-annotated
Add annotated versions of ref-modying functions
Diffstat (limited to 'include/git2/annotated_commit.h')
| -rw-r--r-- | include/git2/annotated_commit.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/git2/annotated_commit.h b/include/git2/annotated_commit.h index e842d2032..7fb896a5f 100644 --- a/include/git2/annotated_commit.h +++ b/include/git2/annotated_commit.h @@ -78,6 +78,23 @@ GIT_EXTERN(int) git_annotated_commit_lookup( const git_oid *id); /** + * Creates a `git_annotated_comit` from a revision string. + * + * See `man gitrevisions`, or + * http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for + * information on the syntax accepted. + * + * @param out pointer to store the git_annotated_commit result in + * @param repo repository that contains the given commit + * @param revspec the extended sha syntax string to use to lookup the commit + * @return 0 on success or error code + */ +GIT_EXTERN(int) git_annotated_commit_from_revspec( + git_annotated_commit **out, + git_repository *repo, + const char *revspec); + +/** * Gets the commit ID that the given `git_annotated_commit` refers to. * * @param commit the given annotated commit |
