commit
f720800b50
|
@ -28,7 +28,7 @@ type Repository struct {
|
||||||
// read, write and delete notes from this repository.
|
// read, write and delete notes from this repository.
|
||||||
Notes NoteCollection
|
Notes NoteCollection
|
||||||
// Tags represents the collection of tags and can be used to create,
|
// Tags represents the collection of tags and can be used to create,
|
||||||
// list and iterate tags in this repository.
|
// list, iterate and remove tags in this repository.
|
||||||
Tags TagsCollection
|
Tags TagsCollection
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
15
tag.go
15
tag.go
|
@ -83,6 +83,21 @@ func (c *TagsCollection) Create(
|
||||||
return oid, nil
|
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
|
// CreateLightweight creates a new lightweight tag pointing to a commit
|
||||||
// and returns the id of the target object.
|
// and returns the id of the target object.
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue