Documentation
¶
Index ¶
Constants ¶
View Source
const HEAD = "HEAD"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloneOptions ¶
type CloneOptions struct {
SparseFilter []string
}
/ CloneOptions to tune the behavior of git clone.
type Options ¶
type Options struct {
IsFSBacked bool
Dir string
ResolveExactTag bool
RecurseSubModules bool // TODO
AllowPreReleases bool
Debug bool
GitSkipAutoDetect bool
}
Options for a git Repository
type Ref ¶
type Ref struct {
*plumbing.Reference
ShortName string
IsTag bool
IsSemver bool
Version semver.Version
}
Ref wraps a git plumbing.Reference.
type Repository ¶
type Repository struct {
*Options
// contains filtered or unexported fields
}
Repository is a git repo.
func NewRepo ¶
func NewRepo(repoURL *url.URL, opts *Options) *Repository
NewRepo initializes a new git repository for a given URL.
No resources are actually fetched or stored yet.
func (*Repository) Clone ¶
func (r *Repository) Clone(ctx context.Context, ref string, opts *CloneOptions) (fs.FS, error)
Clone the repository defined by an URL.
Click to show internal directories.
Click to hide internal directories.