(commit *Commit, pathspecs []string)
| 33 | } |
| 34 | |
| 35 | func (r *Repository) ResetDefaultToCommit(commit *Commit, pathspecs []string) error { |
| 36 | cpathspecs := C.git_strarray{} |
| 37 | cpathspecs.count = C.size_t(len(pathspecs)) |
| 38 | cpathspecs.strings = makeCStringsFromStrings(pathspecs) |
| 39 | defer freeStrarray(&cpathspecs) |
| 40 | |
| 41 | runtime.LockOSThread() |
| 42 | defer runtime.UnlockOSThread() |
| 43 | ret := C.git_reset_default(r.ptr, commit.ptr, &cpathspecs) |
| 44 | |
| 45 | if ret < 0 { |
| 46 | return MakeGitError(ret) |
| 47 | } |
| 48 | return nil |
| 49 | } |
nothing calls this directly
no test coverage detected