git

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 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 CheckoutOptions added in v0.7.2

type CheckoutOptions = git.CheckoutOptions

CheckoutOptions describes how a checkout operation should be performed.

type CommitOptions added in v0.7.2

type CommitOptions = git.CommitOptions

CommitOptions describes how a commit operation should be performed.

type CreateTagOption

type CreateTagOption func(*createTagOptions)

CreateTagOption describes how a tag object should be created.

func WithCreateTagHook added in v0.7.0

func WithCreateTagHook(fn func(*Repository) error) CreateTagOption

WithCreateTagHook adds a tag create hook apply files.

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 WithCreateTagPush

func WithCreateTagPush() CreateTagOption

WithCreateTagPush adds a push performs.

func WithCreateTagPushProgress added in v0.7.0

func WithCreateTagPushProgress(progress sideband.Progress) CreateTagOption

WithCreateTagPushProgress adds push progress.

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 PullOptions added in v0.7.2

type PullOptions = git.PullOptions

PullOptions describes how a pull should be performed.

type PushOptions added in v0.7.2

type PushOptions = git.PushOptions

PushOptions describes how a push should be performed.

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