git

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: AGPL-3.0 Imports: 37 Imported by: 0

Documentation

Overview

Package git implements the source.Fetcher for KindGitRepository.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveLocal added in v0.7.3

func ResolveLocal(
	ctx context.Context,
	location *gitrepo.Location,
	repositories []*manifest.GitRepository,
	options LocalOptions,
) (map[manifest.NamedResource]*store.SourceArtifact, error)

ResolveLocal resolves authored refs from an admitted location's own repository. Only matching mutable HEAD inputs may expose working-tree edits; committed artifacts retain their own object storage and use LocalPath solely for ownership. On error, returned artifacts contain only warnings and no usable content.

Types

type Fetcher

type Fetcher struct {
	Cache *sourcecache.Cache

	// Depth bounds history for refs that do not require reachability validation.
	Depth int
	// RestrictSchemes permits only HTTPS and SSH for untrusted inputs.
	RestrictSchemes bool
	// contains filtered or unexported fields
}

Fetcher acquires immutable Git generations through the common cache owner.

func (*Fetcher) Fetch

func (f *Fetcher) Fetch(
	ctx context.Context,
	repo *manifest.GitRepository,
	reads *store.ReadSet,
	policyValue *sourcecache.Policy,
) (source.PreparedFetch, error)

Fetch acquires content using one execution's captured credentials and declarations.

func (*Fetcher) FetchRemoteBase added in v0.3.4

func (f *Fetcher) FetchRemoteBase(
	ctx context.Context,
	requestValue *RemoteBaseRequest,
	policyValue *sourcecache.Policy,
) (*store.SourceArtifact, error)

FetchRemoteBase returns an immutable lazy view of the whole public repository. An error may retain warnings without usable content.

type LocalOptions added in v0.7.3

type LocalOptions struct {
	Revision string
	Work     manifest.WorkScope
}

LocalOptions carries the admitted revision and requesting operation's attribution.

type RemoteBaseRequest added in v0.7.3

type RemoteBaseRequest struct {
	Work       manifest.WorkScope
	URL        string
	Ref        string
	Timeout    time.Duration
	Submodules bool
}

RemoteBaseRequest carries a public base's effective repository and command policy.

Directories

Path Synopsis
internal
gittransport
Package gittransport installs go-git's bounded HTTPS client at initialization.
Package gittransport installs go-git's bounded HTTPS client at initialization.

Jump to

Keyboard shortcuts

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