git

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTag

func CreateTag(tag string, opts ...CreateTagOption) error

CreateTag creates a tag. If opts is included, the tag is an annotated tag, otherwise a lightweight tag is created.

func Tags

func Tags(path string) ([]string, error)

Tags returns all the tag References in a repository.

Types

type CreateTagOption

type CreateTagOption func(*createTagOptions)

CreateTagOption describes how a tag object should be created.

func WithCreateTagMessage

func WithCreateTagMessage(message string) CreateTagOption

WithCreateTagMessage adds a tag option message.

func WithCreateTagPath

func WithCreateTagPath(path string) CreateTagOption

WithCreateTagPath set repository path.

func WithCreateTagProgress

func WithCreateTagProgress(progress sideband.Progress) CreateTagOption

WithCreateTagRemote adds push progress.

func WithCreateTagPush

func WithCreateTagPush() CreateTagOption

WithCreateTagPush adds a push performs.

func WithCreateTagRef

func WithCreateTagRef(reference string) CreateTagOption

WithCreateTagRef adds a tag option reference.

func WithCreateTagRemote

func WithCreateTagRemote(remote string) CreateTagOption

WithCreateTagRemote adds a push remote name.

type Repository

type Repository = git.Repository

Repository represents a git repository

func NewRepository

func NewRepository(path string) (*Repository, error)

NewRepository opens a git repository from the given path. It detects if the repository is bare or a normal one. If the path doesn't contain a valid repository ErrRepositoryNotExists is returned

type Worktree

type Worktree = git.Worktree

Worktree represents a git worktree.

Jump to

Keyboard shortcuts

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