git

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package git provides shared tooling that other plugins can use to interact with the git repository consistently with other git plugins.

Index

Constants

View Source
const (
	PropertyReleaseBranchPrefix = "release-v"
	DefaultGitTargetBranch      = "master"

	PropertyGitReleaseTag    = "git.release.tag"
	PropertyGitReleaseBranch = "git.release.branch"
	PropertyGitTargetBranch  = "git.target.branch"
)

Variables

View Source
var IgnoreStatus = map[string]struct{}{
	".session.vim": {},
}

IgnoreStatus defines some global files to always ignore when checking for dirtiness.

Functions

func GetPropertyGitReleaseBranch

func GetPropertyGitReleaseBranch(ctx context.Context) (string, error)

func GetPropertyGitReleaseTag

func GetPropertyGitReleaseTag(ctx context.Context) (string, error)

func GetPropertyGitTargetBranch added in v0.1.0

func GetPropertyGitTargetBranch(ctx context.Context) string

func ReleaseBranchRefName

func ReleaseBranchRefName(ctx context.Context) (plumbing.ReferenceName, error)

func ReleaseBranchRefSpec

func ReleaseBranchRefSpec(ctx context.Context) (gitConfig.RefSpec, error)

func ReleaseTagRefSpec

func ReleaseTagRefSpec(ctx context.Context) (gitConfig.RefSpec, error)

func TargetBranch

func TargetBranch(ctx context.Context) string

func TargetBranchRefName

func TargetBranchRefName(ctx context.Context) plumbing.ReferenceName

Types

type Git

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

Git provides tools for working with a Git repository. It sets up client objects to work with the local repository, the remote repository, and the local work tree.

func (*Git) Remote

func (g *Git) Remote() *git.Remote

func (*Git) Repository

func (g *Git) Repository() *git.Repository

func (*Git) SetupGitRepo

func (g *Git) SetupGitRepo(ctx context.Context) error

func (*Git) Worktree

func (g *Git) Worktree() *git.Worktree

Jump to

Keyboard shortcuts

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