Documentation
¶
Overview ¶
Package remote parses and materializes GitHub source specifications.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Result ¶
type Result struct {
Path string // absolute path to the selected file, directory, or repository root
Root string // absolute path to the repository checkout, including its private .git directory
Commit string // full commit object ID
Repository string // canonical https://github.com/owner/repository.git URL
// contains filtered or unexported fields
}
Result describes a materialized source. Call Cleanup when the source is no longer needed; it removes the complete private work area, including .git.
func Materialize ¶
Materialize resolves a GitHub source to a fresh sparse worktree. It always contacts the fixed github.com HTTPS endpoint, fetches only depth one with blob filtering, performs no checkout hooks or submodule initialization, and does not run downloaded code. The caller owns the result and must call Result.Cleanup after use. An omitted subpath intentionally selects the complete repository; specifying a subpath limits checkout to that path. Every call creates a fresh temporary work area; no persistent cache is used.
type Spec ¶
type Spec struct {
Repo string // owner/repository
Path string // optional file or directory within the repository
Ref string // optional branch, tag, or commit
}
Spec identifies one GitHub repository, an optional repository-relative path, and an optional branch, tag, or commit reference.