MCPcopy Create free account
hub / github.com/libgit2/git2go / Next

Method Next

rebase.go:381–393  ·  view source on GitHub ↗

Next performs the next rebase operation and returns the information about it. If the operation is one that applies a patch (which is any operation except RebaseOperationExec) then the patch will be applied and the index and working directory will be updated with the changes. If there are conflicts,

()

Source from the content-addressed store, hash-verified

379// then the patch will be applied and the index and working directory will be updated with the changes.
380// If there are conflicts, you will need to address those before committing the changes.
381func (rebase *Rebase) Next() (*RebaseOperation, error) {
382 runtime.LockOSThread()
383 defer runtime.UnlockOSThread()
384
385 var ptr *C.git_rebase_operation
386 err := C.git_rebase_next(&ptr, rebase.ptr)
387 runtime.KeepAlive(rebase)
388 if err < 0 {
389 return nil, MakeGitError(err)
390 }
391
392 return newRebaseOperationFromC(ptr), nil
393}
394
395// InmemoryIndex gets the index produced by the last operation, which is the
396// result of `Next()` and which will be committed by the next invocation of

Callers

nothing calls this directly

Calls 2

MakeGitErrorFunction · 0.85
newRebaseOperationFromCFunction · 0.85

Tested by

no test coverage detected