mockgit

package
v0.17.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock added in v0.7.15

type Mock struct {
	// contains filtered or unexported fields
}

func NewMockGit

func NewMockGit(t *testing.T) *Mock

NewMockGit creates and new mock git instance

func (*Mock) DeleteRemoteBranch added in v0.16.0

func (m *Mock) DeleteRemoteBranch(ctx context.Context, branch string) error

func (*Mock) ExpectDeleteBranch added in v0.15.0

func (m *Mock) ExpectDeleteBranch(branchName string)

func (*Mock) ExpectEditAbort added in v0.17.2

func (m *Mock) ExpectEditAbort()

ExpectEditAbort expects the rebase abort command

func (*Mock) ExpectEditDoneAmend added in v0.17.2

func (m *Mock) ExpectEditDoneAmend()

ExpectEditDoneAmend expects the amend + rebase continue sequence for a successful edit --done

func (*Mock) ExpectEditDoneAmendWithConflict added in v0.17.2

func (m *Mock) ExpectEditDoneAmendWithConflict()

ExpectEditDoneAmendWithConflict expects amend succeeds but rebase --continue fails (conflict)

func (*Mock) ExpectEditDoneConflictResolved added in v0.17.2

func (m *Mock) ExpectEditDoneConflictResolved()

ExpectEditDoneConflictResolved expects the conflict resolution path (no amend, just rebase continue)

func (*Mock) ExpectEditStart added in v0.17.2

func (m *Mock) ExpectEditStart()

ExpectEditStart expects the interactive rebase command used to start an edit session

func (*Mock) ExpectFetch added in v0.7.15

func (m *Mock) ExpectFetch()

func (*Mock) ExpectFixup added in v0.7.15

func (m *Mock) ExpectFixup(commitHash string)

func (*Mock) ExpectLocalBranch added in v0.9.1

func (m *Mock) ExpectLocalBranch(name string)

func (*Mock) ExpectLogAndRespond added in v0.7.15

func (m *Mock) ExpectLogAndRespond(commits []*git.Commit)

func (*Mock) ExpectNoFetch added in v0.17.2

func (m *Mock) ExpectNoFetch()

func (*Mock) ExpectPushCommits added in v0.7.15

func (m *Mock) ExpectPushCommits(commits []*git.Commit)

func (*Mock) ExpectRemote added in v0.7.15

func (m *Mock) ExpectRemote(remote string)

func (*Mock) ExpectStatus added in v0.15.0

func (m *Mock) ExpectStatus()

func (*Mock) ExpectationsMet added in v0.15.0

func (m *Mock) ExpectationsMet()

func (*Mock) Git added in v0.7.15

func (m *Mock) Git(args string, output *string) error

func (*Mock) GitWithEditor added in v0.7.15

func (m *Mock) GitWithEditor(args string, output *string, editorCmd string) error

func (*Mock) MustGit added in v0.12.1

func (m *Mock) MustGit(argStr string, output *string)

func (*Mock) RootDir added in v0.7.15

func (m *Mock) RootDir() string

func (*Mock) SetRootDir added in v0.17.2

func (m *Mock) SetRootDir(dir string)

SetRootDir sets the root directory returned by RootDir()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL