git

package
v1.0.0-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package git contains git repo cloning functions similar to Kustomize's

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LookupCommit

func LookupCommit(repoPath string) (string, error)

lookupCommit looks up the sha of the current commit on the repo at the provided path.

Types

type RepoSpec

type RepoSpec struct {
	// Host, e.g. github.com
	Host string

	// orgRepo name (organization/repoName),
	// e.g. kubernetes-sigs/kustomize
	OrgRepo string

	// Dir where the orgRepo is cloned to.
	Dir string

	// Commit is the commit for the version that was added to Dir.
	Commit string

	// Relative path in the repository, and in the cloneDir,
	// to a Kustomization.
	Path string

	// Branch or tag reference.
	Ref string

	// e.g. .git or empty in case of _git is present
	GitSuffix string
}

RepoSpec specifies a git repository and a branch and path therein.

func (RepoSpec) AbsPath

func (rs RepoSpec) AbsPath() string

AbsPath is the absolute path to the subdirectory

func (*RepoSpec) CloneSpec

func (rs *RepoSpec) CloneSpec() string

CloneSpec returns the string to pass to git to clone

func (*RepoSpec) RepoRef added in v0.39.3

func (rs *RepoSpec) RepoRef() string

Jump to

Keyboard shortcuts

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