Documentation
¶
Overview ¶
Package git resolves an HTTPS Git repository into a frozen snapshot.
Content is read from the commit's object tree, never from a working directory. That is the whole design: a checkout applies the user's global and repository configuration — core.autocrlf, clean and smudge filters, .gitattributes — any of which silently rewrites file bytes. A bundle built from a checkout would therefore depend on whose machine built it, which DP-012 forbids. Reading blobs directly means the bytes are the bytes the commit contains, everywhere, always.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// URL is the repository. HTTPS only in v1.
URL string `json:"url"`
// Ref is a branch, tag, or commit to resolve. Required when locking.
Ref string `json:"ref"`
// SubPath selects a directory within the repository.
SubPath string `json:"subPath,omitempty"`
}
Config is a Git source's configuration.
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver resolves HTTPS Git repositories.
func (*Resolver) Identity ¶
Identity describes the resolver in provenance, so evidence records which implementation produced a resolution rather than only what it resolved to.