git

package
v0.11.159 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentCommit added in v0.11.152

func CurrentCommit(path string) (string, error)

func EnsureGivenPatternIsInGitignore

func EnsureGivenPatternIsInGitignore(fs afero.Fs, repoRoot string, pattern string) (err error)

Types

type Repo

type Repo struct {
	Path string `json:"path"`
}

Repo represents the path of a given git repository.

func FindRepoFromPath

func FindRepoFromPath(path string) (*Repo, error)

type RepoFinder

type RepoFinder struct{}

RepoFinder is a wrapper for finding the root path of a git repository.

func (*RepoFinder) Repo

func (*RepoFinder) Repo(path string) (*Repo, error)

Repo uses git by spawning a process to locate the top level directory.

Jump to

Keyboard shortcuts

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