git

package
v0.0.0-...-d4af02a Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeGit

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

func NewAlwaysFailsFakeGit

func NewAlwaysFailsFakeGit() *FakeGit

func NewAlwaysFailsOnPullFakeGit

func NewAlwaysFailsOnPullFakeGit() *FakeGit

func NewAlwaysSucceedsFakeGit

func NewAlwaysSucceedsFakeGit() *FakeGit

func NewFakeGit

func NewFakeGit(h func(io.Writer, []string) (bool, error)) *FakeGit

func (*FakeGit) AssertCalledWith

func (f *FakeGit) AssertCalledWith(t *testing.T, expected [][]string)

func (*FakeGit) Checkout

func (f *FakeGit) Checkout(output io.Writer, workingDir string, branch string) error

func (*FakeGit) Commit

func (f *FakeGit) Commit(output io.Writer, workingDir string, message string) error

func (*FakeGit) IsRepoChanged

func (f *FakeGit) IsRepoChanged(output io.Writer, workingDir string) (bool, error)

func (*FakeGit) Pull

func (f *FakeGit) Pull(output io.Writer, workingDir string, remote string, branchName string) error

func (*FakeGit) Push

func (f *FakeGit) Push(output io.Writer, workingDir string, _ string, branchName string) error

type Git

type Git interface {
	Checkout(output io.Writer, workingDir string, branch string) error
	Push(stdout io.Writer, workingDir string, remote string, branchName string) error
	Commit(output io.Writer, workingDir string, message string) error
	IsRepoChanged(output io.Writer, workingDir string) (bool, error)
	Pull(output io.Writer, workingDir string, remote string, branchName string) error
}

type RealGit

type RealGit struct{}

func NewRealGit

func NewRealGit() *RealGit

func (*RealGit) Checkout

func (r *RealGit) Checkout(output io.Writer, workingDir string, branchName string) error

func (*RealGit) Commit

func (r *RealGit) Commit(output io.Writer, workingDir string, message string) error

func (*RealGit) IsRepoChanged

func (r *RealGit) IsRepoChanged(output io.Writer, workingDir string) (bool, error)

func (*RealGit) Pull

func (r *RealGit) Pull(output io.Writer, workingDir string, remote string, branchName string) error

func (*RealGit) Push

func (r *RealGit) Push(output io.Writer, workingDir string, remote string, branchName string) error

Jump to

Keyboard shortcuts

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