diff options
| author | Mirko Nosenzo <[email protected]> | 2016-05-29 14:46:55 +0200 |
|---|---|---|
| committer | Mirko Nosenzo <[email protected]> | 2016-05-29 14:57:00 +0200 |
| commit | 8b855ce7650de8aabb9d23c4cbfef9467c4d4f77 (patch) | |
| tree | cc7144a4c714c5eb9f5929be612627f3c0f0d80b /tag.go | |
| parent | 8eaae73f85dd3df78df80d2dac066eb0866444ae (diff) | |
Tag Remove
Added support for removal of a Tag
Diffstat (limited to 'tag.go')
| -rw-r--r-- | tag.go | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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. // |
