(ptr *C.git_revspec, repo *Repository)
| 39 | } |
| 40 | |
| 41 | func newRevspecFromC(ptr *C.git_revspec, repo *Repository) *Revspec { |
| 42 | var to *Object |
| 43 | var from *Object |
| 44 | |
| 45 | if ptr.to != nil { |
| 46 | to = allocObject(ptr.to, repo) |
| 47 | } |
| 48 | |
| 49 | if ptr.from != nil { |
| 50 | from = allocObject(ptr.from, repo) |
| 51 | } |
| 52 | |
| 53 | return &Revspec{ |
| 54 | to: to, |
| 55 | from: from, |
| 56 | flags: RevparseFlag(ptr.flags), |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | func (r *Repository) Revparse(spec string) (*Revspec, error) { |
| 61 | cspec := C.CString(spec) |
no test coverage detected
searching dependent graphs…