Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloneToBucketOptions ¶
CloneToBucketOptions are options for Clone.
type Cloner ¶
type Cloner interface {
// CloneToBucket clones the repository to the bucket.
//
// The url must contain the scheme, including file:// if necessary.
// depth must be > 0.
CloneToBucket(
ctx context.Context,
envContainer app.EnvContainer,
url string,
depth uint32,
writeBucket storage.WriteBucket,
options CloneToBucketOptions,
) error
}
Cloner clones git repositories to buckets.
type ClonerOptions ¶
type ClonerOptions struct {
HTTPSUsernameEnvKey string
HTTPSPasswordEnvKey string
SSHKeyFileEnvKey string
SSHKnownHostsFilesEnvKey string
}
ClonerOptions are options for a new Cloner.
type ListFilesAndUnstagedFilesOptions ¶ added in v1.14.0
type ListFilesAndUnstagedFilesOptions struct {
// IgnorePathRegexps are regexes of paths to ignore.
//
// These must be unnormalized in the manner of the local OS that the Lister
// is being applied to.
IgnorePathRegexps []*regexp.Regexp
}
ListFilesAndUnstagedFilesOptions are options for ListFilesAndUnstagedFiles.
type Lister ¶ added in v1.14.0
type Lister interface {
// ListFilesAndUnstagedFiles lists all files checked into git except those that
// were deleted, and also lists unstaged files.
//
// This does not list unstaged deleted files
// This does not list unignored files that were not added.
// This ignores regular files.
//
// This is used for situations like license headers where we want all the
// potential git files during development.
//
// The returned paths will be unnormalized.
//
// This is the equivalent of doing:
//
// comm -23 \
// <(git ls-files --cached --modified --others --no-empty-directory --exclude-standard | sort -u | grep -v -e IGNORE_PATH1 -e IGNORE_PATH2) \
// <(git ls-files --deleted | sort -u)
ListFilesAndUnstagedFiles(
ctx context.Context,
envContainer app.EnvStdioContainer,
options ListFilesAndUnstagedFilesOptions,
) ([]string, error)
}
Lister lists files in git repositories.
type Name ¶
type Name interface {
// contains filtered or unexported methods
}
Name is a name identifiable by git.
func NewBranchName ¶
NewBranchName returns a new Name for the branch.
func NewRefNameWithBranch ¶
NewRefNameWithBranch returns a new Name for the ref while setting branch as the clone target.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
git-ls-files-unstaged
command
Package main implements a file lister for git that lists unstaged files.
|
Package main implements a file lister for git that lists unstaged files. |
Click to show internal directories.
Click to hide internal directories.