diff options
| author | Vicent Martà <tanoku@gmail.com> | 2012-04-23 17:28:11 -0700 |
|---|---|---|
| committer | Vicent Martà <tanoku@gmail.com> | 2012-04-23 17:28:11 -0700 |
| commit | f9f2344bd4ba6c81a96959509ba59f8563b60265 (patch) | |
| tree | bb429dc1d066d433ab39076d3369cde56a48bc83 /include/git2 | |
| parent | 4795807ad5b4827ff4bdb801641ce8a4d5a8557e (diff) | |
| parent | 26515e73a11b6f6c25e316ece2a6243aba7af9f5 (diff) | |
| download | libgit2-f9f2344bd4ba6c81a96959509ba59f8563b60265.tar.gz | |
Merge pull request #632 from arrbee/win64-cleanup
Code clean up, including fixing warnings on Windows 64-bit build
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/refs.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/git2/refs.h b/include/git2/refs.h index 5395ded4b..2073aabc5 100644 --- a/include/git2/refs.h +++ b/include/git2/refs.h @@ -33,6 +33,17 @@ GIT_BEGIN_DECL GIT_EXTERN(int) git_reference_lookup(git_reference **reference_out, git_repository *repo, const char *name); /** + * Lookup a reference by name and resolve immediately to OID. + * + * @param oid Pointer to oid to be filled in + * @param repo The repository in which to look up the reference + * @param name The long name for the reference + * @return 0 on success, -1 if name could not be resolved + */ +GIT_EXTERN(int) git_reference_name_to_oid( + git_oid *out, git_repository *repo, const char *name); + +/** * Create a new symbolic reference. * * The reference will be created in the repository and written @@ -304,6 +315,15 @@ GIT_EXTERN(int) git_reference_reload(git_reference *ref); */ GIT_EXTERN(void) git_reference_free(git_reference *ref); +/** + * Compare two references. + * + * @param ref1 The first git_reference + * @param ref2 The second git_reference + * @return GIT_SUCCESS if the same, else a stable but meaningless ordering. + */ +GIT_EXTERN(int) git_reference_cmp(git_reference *ref1, git_reference *ref2); + /** @} */ GIT_END_DECL #endif |
