git

package
v0.0.0-...-9dcacef Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func CheckoutTag

func CheckoutTag(
	ctx context.Context,
	repo *Repository,
	tag string,
) error

CheckoutTag checkouts a repository tag by looking for the tag reference then calling the checkout function.

Calling This function is equivalent to executing `git checkout tags/$tag`

func FetchTags

func FetchTags(
	ctx context.Context,
	repo *Repository,
) error

FetchTags fetches a repository's remote tags.

Calling this function is equivalent to executing `git -C $path fetch --all --tags`

Types

type Repository

type Repository = gogit.Repository

func Clone

func Clone(
	ctx context.Context,
	path,
	repositoryURL string,
) (*Repository, error)

Clone clones a git repository into a given directory and returns a Repository object that can be used to manipulate that clone'd repo.

Calling his function is equivalent to executing `git clone $repositoryURL $path`

Jump to

Keyboard shortcuts

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