gitpath

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver struct{}

Resolver resolves one or more git glob paths in a git repository by running git ls-files. Glob paths are only resolved to files that exist in the filesystem and are tracked in the repository.

func (*Resolver) Resolve

func (r *Resolver) Resolve(workingDir, glob string) ([]string, error)

Resolve resolves the glob paths to absolute file paths by calling git ls-files. workingDir must be a directory that is part of a Git repository. Glob must be a pattern that is an absolute path. If a glob does not resolve to an existing file in the filesystem or the file is not part of the git repository an empty slice is returned.

Jump to

Keyboard shortcuts

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