git

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckoutHead

func CheckoutHead() *execabs.Cmd

CheckoutHead handles head checkout.

func CheckoutLFS

func CheckoutLFS() *execabs.Cmd

CheckoutLFS handles commit checkout.

func CheckoutSha

func CheckoutSha(repo Repository) *execabs.Cmd

CheckoutSha handles commit checkout.

func ConfigRemapSubmodule

func ConfigRemapSubmodule(name, url string) *execabs.Cmd

ConfigRemapSubmodule returns a git command that, when executed configures git to remap submodule urls.

func ConfigSSHCommand

func ConfigSSHCommand(sshKey string) *execabs.Cmd

ConfigSSHCommand sets custom SSH key.

func ConfigSSLVerify

func ConfigSSLVerify(repo Repository) *execabs.Cmd

ConfigSSLVerify disables globally the git ssl verification.

func ConfigSafeDirectory

func ConfigSafeDirectory(repo Repository) *execabs.Cmd

ConfigSafeDirectory disables globally the git ssl verification.

func FetchLFS

func FetchLFS() *execabs.Cmd

FetchLFS fetches lfs.

func FetchSource

func FetchSource(ref string, depth int, filter string) *execabs.Cmd

FetchSource fetches the source from remote.

func FetchTags added in v0.1.1

func FetchTags() *execabs.Cmd

FetchTags fetches the source from remote.

func Init

func Init(repo Repository) *execabs.Cmd

RemoteRemove drops the defined remote from a git repo.

func RemoteAdd

func RemoteAdd(url string) *execabs.Cmd

RemoteAdd adds an additional remote to a git repo.

func SubmoduleUpdate

func SubmoduleUpdate(repo Repository) *execabs.Cmd

SubmoduleUpdate recursively initializes and updates submodules.

func WriteNetrc

func WriteNetrc(machine, login, password string) error

WriteNetrc writes the netrc file.

Types

type Repository

type Repository struct {
	RemoteURL        string
	RemoteSSH        string
	Branch           string
	CommitSha        string
	CommitRef        string
	Submodules       map[string]string
	SubmoduleRemote  bool
	SubmodulePartial bool

	InsecureSkipSSLVerify bool
	SafeDirectory         string
	InitExists            bool
}

Jump to

Keyboard shortcuts

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