Documentation
¶
Overview ¶
Package local implements gitworkspace.Workspace by executing commands as local subprocesses against a git clone on disk.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
func NewFactory(p Params) (gitworkspace.Factory, error)
NewFactory creates a gitworkspace.Factory that runs commands as local subprocesses in the given directory. It fails when a set Runtime is invalid or only half of the committer identity is set.
Types ¶
type Params ¶
type Params struct {
// Dir is the path to the local git clone.
Dir string
// Runtime pins the executable, helper paths and scrubbed environment that
// git commands run on. When zero, git is resolved from PATH and inherits the
// caller's environment.
Runtime Runtime
// CommitterName and CommitterEmail identify the committer of every commit a
// git command creates. Set both or neither; when unset, the repository and
// environment configuration decide.
CommitterName string
CommitterEmail string
}
Params configures a local workspace factory.
type Runtime ¶
type Runtime struct {
// Executable is the absolute path to the Git executable.
Executable string
// ExecPath is the absolute directory containing Git's helper executables.
ExecPath string
// TemplateDir is the absolute directory containing Git's repository
// templates.
TemplateDir string
// PassthroughEnv names additional environment variables to inherit from
// the parent process, on top of the auth and transport ones always passed
// through. For a deployment whose remote needs something unusual; leave
// empty otherwise. Names that could alter merge semantics do not belong
// here — the scrubbed environment is what keeps a merge reproducible.
PassthroughEnv []string
}
Runtime identifies the explicitly provided Git runtime that commands run on.