Documentation ¶
Index ¶
- func CreateTag(tag string, opts ...CreateTagOption) error
- func Tags(path string) ([]string, error)
- type CheckoutOptions
- type CommitOptions
- type CreateTagOption
- func WithCreateTagHook(fn func(*Repository) error) CreateTagOption
- func WithCreateTagMessage(message string) CreateTagOption
- func WithCreateTagPath(path string) CreateTagOption
- func WithCreateTagPush() CreateTagOption
- func WithCreateTagPushProgress(progress sideband.Progress) CreateTagOption
- func WithCreateTagRef(reference string) CreateTagOption
- func WithCreateTagRemote(remote string) CreateTagOption
- type PullOptions
- type PushOptions
- type Repository
- type Worktree
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.
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