git

package
v1.11.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitClient

type GitClient struct{}

func NewGit

func NewGit() GitClient

func (GitClient) Branch added in v1.11.0

func (g GitClient) Branch(repo scm.Repo) (string, error)

func (GitClient) Checkout

func (g GitClient) Checkout(repo scm.Repo) error

func (GitClient) Clean

func (g GitClient) Clean(repo scm.Repo) error

func (GitClient) Clone

func (g GitClient) Clone(repo scm.Repo) error

func (GitClient) FetchAll added in v1.7.2

func (g GitClient) FetchAll(repo scm.Repo) error

func (GitClient) FetchCloneBranch added in v1.9.13

func (g GitClient) FetchCloneBranch(repo scm.Repo) error

func (GitClient) HasRemoteHeads added in v1.11.1

func (g GitClient) HasRemoteHeads(repo scm.Repo) (bool, error)

func (GitClient) Pull

func (g GitClient) Pull(repo scm.Repo) error

func (GitClient) RepoCommitCount added in v1.9.13

func (g GitClient) RepoCommitCount(repo scm.Repo) (int, error)

func (GitClient) Reset

func (g GitClient) Reset(repo scm.Repo) error

func (GitClient) RevListCompare added in v1.11.0

func (g GitClient) RevListCompare(repo scm.Repo, localBranch string, remoteBranch string) (string, error)

RevListCompare returns the list of commits in the local branch that are not in the remote branch.

func (GitClient) SetOrigin

func (g GitClient) SetOrigin(repo scm.Repo) error

func (GitClient) SetOriginWithCredentials added in v1.8.7

func (g GitClient) SetOriginWithCredentials(repo scm.Repo) error

func (GitClient) ShortStatus added in v1.11.0

func (g GitClient) ShortStatus(repo scm.Repo) (string, error)

func (GitClient) UpdateRemote

func (g GitClient) UpdateRemote(repo scm.Repo) error

type Gitter

type Gitter interface {
	Clone(scm.Repo) error
	Reset(scm.Repo) error
	Pull(scm.Repo) error
	SetOrigin(scm.Repo) error
	SetOriginWithCredentials(scm.Repo) error
	Clean(scm.Repo) error
	Checkout(scm.Repo) error
	RevListCompare(scm.Repo, string, string) (string, error)
	ShortStatus(scm.Repo) (string, error)
	Branch(scm.Repo) (string, error)
	UpdateRemote(scm.Repo) error
	FetchAll(scm.Repo) error
	FetchCloneBranch(scm.Repo) error
	RepoCommitCount(scm.Repo) (int, error)
	HasRemoteHeads(scm.Repo) (bool, error)
}

Jump to

Keyboard shortcuts

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