git

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithDir

func WithDir(dir string) cmdOption

func WithLogger

func WithLogger(logger *logger.Logger) cmdOption

Types

type CmdCfg

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

func NewCmdConfig

func NewCmdConfig(t testing.TB, opts ...cmdOption) *CmdCfg

NewCmdConfig sets defaults and validates values for git Options.

func (*CmdCfg) AddAll

func (g *CmdCfg) AddAll()

AddAll stages all changes.

func (*CmdCfg) Commit

func (g *CmdCfg) Commit()

CommitWithMsg commits changes with a generated commit msg.

func (*CmdCfg) CommitWithMsg

func (g *CmdCfg) CommitWithMsg(msg string, commitFlags []string)

CommitWithMsg commits changes with commit msg.

func (*CmdCfg) GetLatestCommit

func (g *CmdCfg) GetLatestCommit() string

GetLatestCommit returns latest commit

func (*CmdCfg) Init

func (g *CmdCfg) Init()

Init run git init

func (*CmdCfg) RunCmdE

func (g *CmdCfg) RunCmdE(args ...string) (string, error)

RunCmd executes a git command

Jump to

Keyboard shortcuts

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