(filename string)
| 50 | } |
| 51 | |
| 52 | func (t *Tree) EntryByName(filename string) *TreeEntry { |
| 53 | cname := C.CString(filename) |
| 54 | defer C.free(unsafe.Pointer(cname)) |
| 55 | |
| 56 | entry := C.git_tree_entry_byname(t.cast_ptr, cname) |
| 57 | if entry == nil { |
| 58 | return nil |
| 59 | } |
| 60 | |
| 61 | goEntry := newTreeEntry(entry) |
| 62 | runtime.KeepAlive(t) |
| 63 | return goEntry |
| 64 | } |
| 65 | |
| 66 | // EntryById performs a lookup for a tree entry with the given SHA value. |
| 67 | // |