summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/refdb.h7
-rw-r--r--include/git2/refs.h11
2 files changed, 17 insertions, 1 deletions
diff --git a/include/git2/refdb.h b/include/git2/refdb.h
index 0586b119e..76b8fda0d 100644
--- a/include/git2/refdb.h
+++ b/include/git2/refdb.h
@@ -35,7 +35,12 @@ GIT_EXTERN(git_reference *) git_reference__alloc(
git_refdb *refdb,
const char *name,
const git_oid *oid,
- const char *symbolic);
+ const git_oid *peel);
+
+GIT_EXTERN(git_reference *) git_reference__alloc_symbolic(
+ git_refdb *refdb,
+ const char *name,
+ const char *target);
/**
* Create a new reference database with no backends.
diff --git a/include/git2/refs.h b/include/git2/refs.h
index e0451ba82..1ff0d4544 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.