git

package
v0.1.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Amend

func Amend(ca *git.Commit, msg string) (*git.Commit, error)

Amend amends the HEAD commit

func Commit

func Commit(r *git.Repository, msg string) (*git.Commit, error)

Commit creates a new commit with the current tree.

func CommitMsgHook

func CommitMsgHook(root string, in string) (msg string, err error)

func Getrepo

func Getrepo() (*git2go.Repository, error)

Getrepo returns the repository in the current directory or an error.

func ParseRemote

func ParseRemote(r *git.Repository, name string, fallback bool) (*url.URL, error)

func PostCommitHook

func PostCommitHook(root string) error

func PreCommitHook

func PreCommitHook(root string) error

func PrepareCommitMsgHook

func PrepareCommitMsgHook(root string) (msg string, err error)

func RepoTree

func RepoTree(r *git.Repository) (*git.Tree, error)

RepoTree return the current index tree

func StageReady

func StageReady(r *git.Repository) (bool, error)

StageReady returns true if the stage is ready to be committed. Otherwise it returns false if there is nothing to commit or an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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