(hintPath string)
| 77 | } |
| 78 | |
| 79 | func (repo *Repository) CreateFromStream(hintPath string) (*BlobWriteStream, error) { |
| 80 | var chintPath *C.char = nil |
| 81 | var stream *C.git_writestream |
| 82 | |
| 83 | if len(hintPath) > 0 { |
| 84 | chintPath = C.CString(hintPath) |
| 85 | defer C.free(unsafe.Pointer(chintPath)) |
| 86 | } |
| 87 | |
| 88 | runtime.LockOSThread() |
| 89 | defer runtime.UnlockOSThread() |
| 90 | |
| 91 | ecode := C.git_blob_create_from_stream(&stream, repo.ptr, chintPath) |
| 92 | if ecode < 0 { |
| 93 | return nil, MakeGitError(ecode) |
| 94 | } |
| 95 | |
| 96 | return newBlobWriteStreamFromC(stream, repo), nil |
| 97 | } |
| 98 | |
| 99 | type BlobWriteStream struct { |
| 100 | doNotCompare |
nothing calls this directly
no test coverage detected