git

package
v0.0.373 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AssumeSSHAuth = false

Functions

func CurrentBranch

func CurrentBranch(ctx context.Context, path string) (string, error)

func IsRepoRoot

func IsRepoRoot(ctx context.Context, path string) (bool, error)

func RemoteUrl

func RemoteUrl(ctx context.Context, path string) (string, error)

E.g. github.com/username/reponame

func RunGit

func RunGit(ctx context.Context, dir string, args ...string) ([]byte, []byte, error)

Types

type EnvVars

type EnvVars map[string]string

func (EnvVars) Deterministic

func (vars EnvVars) Deterministic() TupleList

type Status

type Status struct {
	Revision    string    // Optional.
	CommitTime  time.Time // Optional.
	Uncommitted bool      // Required.
}

Status is the current state of a local repository.

func FetchStatus

func FetchStatus(ctx context.Context, rootDir string) (Status, error)

type TupleList

type TupleList [][2]string

func NoPromptEnv

func NoPromptEnv() TupleList

func ResetConfigGlobal added in v0.0.78

func ResetConfigGlobal() (TupleList, func(), error)

func (TupleList) Serialize

func (tl TupleList) Serialize() []string

Jump to

Keyboard shortcuts

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