InmemoryIndex gets the index produced by the last operation, which is the result of `Next()` and which will be committed by the next invocation of `Commit()`. This is useful for resolving conflicts in an in-memory rebase before committing them. This is only applicable for in-memory rebases; for reb
()
| 400 | // This is only applicable for in-memory rebases; for rebases within a working |
| 401 | // directory, the changes were applied to the repository's index. |
| 402 | func (rebase *Rebase) InmemoryIndex() (*Index, error) { |
| 403 | runtime.LockOSThread() |
| 404 | defer runtime.UnlockOSThread() |
| 405 | |
| 406 | var ptr *C.git_index |
| 407 | err := C.git_rebase_inmemory_index(&ptr, rebase.ptr) |
| 408 | runtime.KeepAlive(rebase) |
| 409 | if err < 0 { |
| 410 | return nil, MakeGitError(err) |
| 411 | } |
| 412 | |
| 413 | return newIndexFromC(ptr, rebase.r), nil |
| 414 | } |
| 415 | |
| 416 | // Commit commits the current patch. |
| 417 | // You must have resolved any conflicts that were introduced during the patch application from the Next() invocation. |