git

package
v0.1.5-beta Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package git provides the git adapter — executes real git commands via os/exec.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecAdapter

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

ExecAdapter implements ports.Git using os/exec.

func New

func New(workDir string) *ExecAdapter

New creates a new git ExecAdapter.

func (*ExecAdapter) Add

func (a *ExecAdapter) Add(paths []string) error

func (*ExecAdapter) AddRemote

func (a *ExecAdapter) AddRemote(name, url string) (string, error)

func (*ExecAdapter) Blame

func (a *ExecAdapter) Blame(file string) (string, error)

func (*ExecAdapter) Branch

func (a *ExecAdapter) Branch(name string) (string, error)

func (*ExecAdapter) Checkout

func (a *ExecAdapter) Checkout(name string) (string, error)

func (*ExecAdapter) CherryPick

func (a *ExecAdapter) CherryPick(commit string) (string, error)

func (*ExecAdapter) Clean

func (a *ExecAdapter) Clean(directories bool) (string, error)

func (*ExecAdapter) Clone

func (a *ExecAdapter) Clone(url string) (string, error)

func (*ExecAdapter) Commit

func (a *ExecAdapter) Commit(message string) (string, error)

func (*ExecAdapter) CommitsFromTag

func (a *ExecAdapter) CommitsFromTag(tag string) (string, error)

CommitsFromTag returns commits since the given tag.

func (*ExecAdapter) CreateRelease

func (a *ExecAdapter) CreateRelease(name, changelog string) (string, error)

CreateRelease creates a GitHub release.

func (*ExecAdapter) CurrentBranch

func (a *ExecAdapter) CurrentBranch() (string, error)

func (*ExecAdapter) DeleteBranch

func (a *ExecAdapter) DeleteBranch(name string) (string, error)

func (*ExecAdapter) DeleteTag added in v1.3.0

func (a *ExecAdapter) DeleteTag(name string) (string, error)

func (*ExecAdapter) Diff

func (a *ExecAdapter) Diff() (string, error)

func (*ExecAdapter) DiffStaged

func (a *ExecAdapter) DiffStaged() (string, error)

func (*ExecAdapter) Fetch

func (a *ExecAdapter) Fetch() (string, error)

func (*ExecAdapter) Init

func (a *ExecAdapter) Init() (string, error)

func (*ExecAdapter) IsGHAuthenticated

func (a *ExecAdapter) IsGHAuthenticated() (bool, error)

IsGHAuthenticated checks if gh is authenticated.

func (*ExecAdapter) IsRepo

func (a *ExecAdapter) IsRepo() bool

func (*ExecAdapter) LatestTag

func (a *ExecAdapter) LatestTag() (string, error)

LatestTag returns the most recent tag.

func (*ExecAdapter) ListBranches

func (a *ExecAdapter) ListBranches() (string, error)

func (*ExecAdapter) ListTags

func (a *ExecAdapter) ListTags() ([]string, error)

func (*ExecAdapter) ListUntracked

func (a *ExecAdapter) ListUntracked() ([]string, error)

func (*ExecAdapter) Log

func (a *ExecAdapter) Log(limit int) (string, error)

func (*ExecAdapter) Merge

func (a *ExecAdapter) Merge(branch string) (string, error)

func (*ExecAdapter) Pull

func (a *ExecAdapter) Pull() (string, error)

func (*ExecAdapter) PullRebase

func (a *ExecAdapter) PullRebase() (string, error)

func (*ExecAdapter) Push

func (a *ExecAdapter) Push() (string, error)

func (*ExecAdapter) PushWithUpstream

func (a *ExecAdapter) PushWithUpstream(branch string) (string, error)

func (*ExecAdapter) Rebase

func (a *ExecAdapter) Rebase(branch string) (string, error)

func (*ExecAdapter) RebaseAbort

func (a *ExecAdapter) RebaseAbort() (string, error)

func (*ExecAdapter) RebaseContinue

func (a *ExecAdapter) RebaseContinue() (string, error)

func (*ExecAdapter) Reflog

func (a *ExecAdapter) Reflog(limit int) (string, error)

func (*ExecAdapter) Remove

func (a *ExecAdapter) Remove(paths []string) error

func (*ExecAdapter) RemoveRemote

func (a *ExecAdapter) RemoveRemote(name string) (string, error)

func (*ExecAdapter) RenameBranch added in v1.4.2

func (a *ExecAdapter) RenameBranch(oldName, newName string) (string, error)

func (*ExecAdapter) Reset

func (a *ExecAdapter) Reset(mode string, commit string) (string, error)

func (*ExecAdapter) ResetSoft

func (a *ExecAdapter) ResetSoft(commits int) error

func (*ExecAdapter) Revert

func (a *ExecAdapter) Revert(commit string) (string, error)

func (*ExecAdapter) Show

func (a *ExecAdapter) Show(commit string) (string, error)

func (*ExecAdapter) Stash

func (a *ExecAdapter) Stash() (string, error)

func (*ExecAdapter) StashPop

func (a *ExecAdapter) StashPop() (string, error)

func (*ExecAdapter) Status

func (a *ExecAdapter) Status() (domain.Status, error)

func (*ExecAdapter) Switch

func (a *ExecAdapter) Switch(name string) error

func (*ExecAdapter) Tag

func (a *ExecAdapter) Tag(name string) (string, error)

func (*ExecAdapter) TagExists

func (a *ExecAdapter) TagExists(name string) (bool, error)

TagExists checks if a tag exists.

Jump to

Keyboard shortcuts

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