diff options
| author | Brad Morgan <brad@dmgctrl.com> | 2013-05-07 14:30:35 -0400 |
|---|---|---|
| committer | Brad Morgan <brad@dmgctrl.com> | 2013-05-07 14:30:35 -0400 |
| commit | 00e43380a0beee3ac40935c45d4aa67fbfc27fbb (patch) | |
| tree | 6b9c959fa74694fb0f1841d9669dfc6221ff4277 /include/git2/refs.h | |
| parent | 7369b3c3bf396e466d065f9921415fe2b9d69a7a (diff) | |
| parent | 42b2bcf038b4e45df33a1078dd05a95759addd35 (diff) | |
| download | libgit2-00e43380a0beee3ac40935c45d4aa67fbfc27fbb.tar.gz | |
Merge remote-tracking branch 'origin/development' into ssh_transport
Diffstat (limited to 'include/git2/refs.h')
| -rw-r--r-- | include/git2/refs.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/git2/refs.h b/include/git2/refs.h index e0451ba82..e1d425352 100644 --- a/include/git2/refs.h +++ b/include/git2/refs.h @@ -133,6 +133,17 @@ GIT_EXTERN(int) git_reference_create(git_reference **out, git_repository *repo, GIT_EXTERN(const git_oid *) git_reference_target(const git_reference *ref); /** + * Return the peeled OID target of this reference. + * + * This peeled OID only applies to direct references that point to + * a hard Tag object: it is the result of peeling such Tag. + * + * @param ref The reference + * @return a pointer to the oid if available, NULL otherwise + */ +GIT_EXTERN(const git_oid *) git_reference_target_peel(const git_reference *ref); + +/** * Get full name to the reference pointed to by a symbolic reference. * * Only available if the reference is symbolic. @@ -411,6 +422,13 @@ typedef enum { * (e.g., foo/<star>/bar but not foo/bar<star>). */ GIT_REF_FORMAT_REFSPEC_PATTERN = (1 << 1), + + /** + * Interpret the name as part of a refspec in shorthand form + * so the `ONELEVEL` naming rules aren't enforced and 'master' + * becomes a valid name. + */ + GIT_REF_FORMAT_REFSPEC_SHORTHAND = (1 << 2), } git_reference_normalize_t; /** |
