Documentation
¶
Index ¶
- Constants
- Variables
- func Checkout(name string, create bool, opts *Options) error
- func Clone(url, path string, opts *Options) error
- func Config(name, value string, opts *Options) error
- func CreateTag(tag string, opts *Options) error
- func DeleteTag(tag string, opts *Options) error
- func EnsureCurrent() (string, error)
- func EnsureNoUncommitted(opts *Options) error
- func EnsurePath(dir string) error
- func Exec(args []string, opts *Options) error
- func Fetch(remote string, branch, tag bool, opts *Options) error
- func GetCurrentBranch(opts *Options) (string, error)
- func GetDefaultBranch(remote string, opts *Options) (string, error)
- func ListCommitsBetween(target string, opts *Options) ([]string, error)
- func ListLocalBranchNames(current bool, opts *Options) ([]string, error)
- func ListRemoteBranches(remote string, locals []*BranchDetail, opts *Options) ([]string, error)
- func ListRemotes(opts *Options) ([]string, error)
- func ListTags(opts *Options) ([]string, error)
- func Output(args []string, opts *Options) (string, error)
- func OutputItems(args []string, opts *Options) ([]string, error)
- func Pull(opts *Options) error
- func PushTag(tag string, remote string, remove bool, opts *Options) error
- func SetRemoteURL(remote, url string, opts *Options) error
- func Switch(local, target string, opts *Options) error
- type BranchDetail
- type DiscoverDir
- type ExecError
- type Options
- type UncommittedChangeError
Constants ¶
View Source
const ( RemoteStatusSync = "sync" RemoteStatusGone = "deleted" RemoteStatusAhead = "ahead" RemoteStatusBehind = "behind" RemoteStatusConflict = "conflict" RemoteStatusDetached = "detached" RemoteStatusNone = "none" )
Variables ¶
View Source
var ( Default = &Options{} QuietOutput = &Options{QuietStderr: true} Mute = &Options{ QuietStderr: true, QuietCmd: true, } )
View Source
var ErrNotGit = errors.New("you are not int a git repository")
Functions ¶
func EnsureCurrent ¶
func EnsureNoUncommitted ¶
func EnsurePath ¶
func GetCurrentBranch ¶
func GetDefaultBranch ¶ added in v0.5.0
func ListCommitsBetween ¶ added in v0.4.0
func ListLocalBranchNames ¶ added in v0.1.0
func ListRemoteBranches ¶
func ListRemoteBranches(remote string, locals []*BranchDetail, opts *Options) ([]string, error)
func ListRemotes ¶
func SetRemoteURL ¶
Types ¶
type BranchDetail ¶
type BranchDetail struct { Name string RemoteStatus string Current bool IsRemote bool Remote string Commit string CommitMsg string }
func ListLocalBranches ¶
func ListLocalBranches(opts *Options) ([]*BranchDetail, error)
func ParseBranchDetail ¶
func ParseBranchDetail(line string) (*BranchDetail, error)
type DiscoverDir ¶ added in v0.2.0
func Discover ¶ added in v0.2.0
func Discover(rootDir string) ([]*DiscoverDir, error)
type UncommittedChangeError ¶
type UncommittedChangeError struct {
// contains filtered or unexported fields
}
func (*UncommittedChangeError) Error ¶
func (e *UncommittedChangeError) Error() string
Click to show internal directories.
Click to hide internal directories.