summaryrefslogtreecommitdiff
path: root/tag.go
diff options
context:
space:
mode:
authorMirko Nosenzo <[email protected]>2016-10-08 11:33:56 +0200
committerMirko Nosenzo <[email protected]>2016-10-08 11:33:56 +0200
commit4567e4f7fa621df30e84ee643a27998776919b26 (patch)
tree203c24d93683a2bda5bab19c578a2c108159337e /tag.go
parent717a47f7547811622fb1c08c28262a8c63af96fe (diff)
parent22091886372e73de5d66168e8665775676ec13c5 (diff)
Merge remote-tracking branch 'upstream/v24' into remote-refinements
Diffstat (limited to 'tag.go')
-rw-r--r--tag.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/tag.go b/tag.go
index 8957430..81d7258 100644
--- a/tag.go
+++ b/tag.go
@@ -83,6 +83,21 @@ func (c *TagsCollection) Create(
return oid, nil
}
+func (c *TagsCollection) Remove(name string) error {
+ runtime.LockOSThread()
+ defer runtime.UnlockOSThread()
+
+ cname := C.CString(name)
+ defer C.free(unsafe.Pointer(cname))
+
+ ret := C.git_tag_delete(c.repo.ptr, cname)
+ if ret < 0 {
+ return MakeGitError(ret)
+ }
+
+ return nil
+}
+
// CreateLightweight creates a new lightweight tag pointing to a commit
// and returns the id of the target object.
//