summaryrefslogtreecommitdiff
path: root/include/git2/refs.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-02-05 12:02:52 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2014-02-05 12:07:57 +0100
commit5367ec4b84dc3b4ff3ff441347ce07d6065dd759 (patch)
tree34af4e078648a927f79d7ee5ffbba111f7b54f89 /include/git2/refs.h
parentb7ae71ecf263047c427be099a3e1536cca17dc5d (diff)
downloadlibgit2-5367ec4b84dc3b4ff3ff441347ce07d6065dd759.tar.gz
refs: add an unconditional delete
Add it under the git_reference_remove() name, letting the user pass the repo and name, analogous to unconditional setting/creation.
Diffstat (limited to 'include/git2/refs.h')
-rw-r--r--include/git2/refs.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/git2/refs.h b/include/git2/refs.h
index 0e5f779cf..970faf744 100644
--- a/include/git2/refs.h
+++ b/include/git2/refs.h
@@ -407,6 +407,17 @@ GIT_EXTERN(int) git_reference_rename(
GIT_EXTERN(int) git_reference_delete(git_reference *ref);
/**
+ * Delete an existing reference by name
+ *
+ * This method removes the named reference from the repository without
+ * looking at its old value.
+ *
+ * @param ref The reference to remove
+ * @return 0, GIT_EMODIFIED or an error code
+ */
+GIT_EXTERN(int) git_reference_remove(git_repository *repo, const char *name);
+
+/**
* Fill a list with all the references that can be found in a repository.
*
* The string array will be filled with the names of all references; these