gitsource

package
v0.0.0-...-abaeddd Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package gitsource checks out the repository an image is built from (environment.images[].git): a remote one, cloned once into a cache and fetched as git.pull says, or a local one, used as it is. A branch or ref is checked out in a temporary worktree, removed after the build, so neither the cache nor a developer's checkout changes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheDir

func CacheDir(url string) (string, error)

CacheDir is where a remote repository is cloned: ~/.jig/cache/git/<host>/<org>/<repo>.

func Checkout

func Checkout(ctx context.Context, g cluster.Git, dir string) (string, func(), error)

Checkout returns the directory to build g from, and what removes what it made. dir is the directory of the file that declares g, for a local path.

func IsRemote

func IsRemote(url string) bool

IsRemote reports whether url names a remote repository (https://…, git@host:org/repo.git); anything else is a local path.

func LocalPath

func LocalPath(dir, url string) string

LocalPath is a local git.url resolved from dir, the directory of the file that declares it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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