NewReferenceIteratorGlob creates an iterator over reference names that match the speicified glob. The glob is of the usual fnmatch type.
(glob string)
| 410 | // that match the speicified glob. The glob is of the usual fnmatch |
| 411 | // type. |
| 412 | func (repo *Repository) NewReferenceIteratorGlob(glob string) (*ReferenceIterator, error) { |
| 413 | cstr := C.CString(glob) |
| 414 | defer C.free(unsafe.Pointer(cstr)) |
| 415 | var ptr *C.git_reference_iterator |
| 416 | |
| 417 | runtime.LockOSThread() |
| 418 | defer runtime.UnlockOSThread() |
| 419 | |
| 420 | ret := C.git_reference_iterator_glob_new(&ptr, repo.ptr, cstr) |
| 421 | if ret < 0 { |
| 422 | return nil, MakeGitError(ret) |
| 423 | } |
| 424 | |
| 425 | return newReferenceIteratorFromC(ptr, repo), nil |
| 426 | } |
| 427 | |
| 428 | func (i *ReferenceIterator) Names() *ReferenceNameIterator { |
| 429 | return &ReferenceNameIterator{ReferenceIterator: i} |
nothing calls this directly
no test coverage detected