summaryrefslogtreecommitdiff
path: root/tag.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2016-08-27 21:07:44 +0200
committerCarlos Martín Nieto <[email protected]>2016-08-27 21:07:44 +0200
commitaadd0c2035d12b6469c53b7c444ea6fe1006c2c0 (patch)
treefd56478f8014dd41dcba043dc0677930d14c4b06 /tag.go
parent37d3c2d9ad4c4e970cac02faec8ad184412c34e6 (diff)
parent241aa34d83b210ceaab7029c46e05794f2ea9797 (diff)
Merge remote-tracking branch 'upstream/master' into next
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.
//