git

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileCommits

func FileCommits(
	ctx context.Context,
	repo, relFilePath string,
	errors chan error,
) (io.ReadCloser, error)

func FileContent

func FileContent(
	ctx context.Context,
	repo, relFilePath, commit string,
	errors chan error,
) (io.ReadCloser, error)

func FileContents

func FileContents(
	ctx context.Context,
	repo, relFilePath string,
	results chan FileContentResult,
) error

func FindRepoRoot

func FindRepoRoot(path string) string

func GitPaths

func GitPaths(path string) (string, string)

GitPaths returns the repository root and the relative filepath of the given file. The paths use forward slashes, as this helps working with git.

Types

type FileContentResult

type FileContentResult struct {
	Data  []byte
	Error error
}

Jump to

Keyboard shortcuts

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