Documentation
¶
Index ¶
- func GetGitVersion() (*semver.Version, error)
- func IsValidCommitHash(hash string) bool
- func MustGetGitVersion() *semver.Version
- type Branch
- type Commit
- func (c *Commit) Equals(otherCommit *Commit) bool
- func (c *Commit) EqualsPatchId(otherCommit *Commit) (bool, error)
- func (c *Commit) GetAuthorDate() (time.Time, error)
- func (c *Commit) GetAuthorDateRelative() (string, error)
- func (c *Commit) GetAuthorEmail() (string, error)
- func (c *Commit) GetAuthorName() (string, error)
- func (c *Commit) GetBody() (string, error)
- func (c *Commit) GetFullHash() (string, error)
- func (c *Commit) GetHash() string
- func (c *Commit) GetLocalBranches() ([]*LocalBranch, error)
- func (c *Commit) GetMessage() (string, error)
- func (c *Commit) GetPatchId() (string, error)
- func (c *Commit) GetRemoteBranches(remote *Remote) ([]*RemoteBranch, error)
- func (c *Commit) GetShortHash() (string, error)
- func (c *Commit) String() string
- type LocalBranch
- func (b *LocalBranch) Delete() error
- func (b *LocalBranch) Equals(otherLocalBranch *LocalBranch) bool
- func (b *LocalBranch) ForceDelete() error
- func (b *LocalBranch) GetCommitsByMessage(msg string) ([]*Commit, error)
- func (b *LocalBranch) GetFullName() string
- func (b *LocalBranch) GetHeadCommit() (*Commit, error)
- func (b *LocalBranch) GetName() string
- func (b *LocalBranch) GetTrackingRemote(r *Remote) (*RemoteBranch, error)
- func (b *LocalBranch) IsMainBranch() (bool, error)
- func (b *LocalBranch) IsMergedTo(target Branch) (bool, error)
- func (b *LocalBranch) String() string
- type Remote
- type RemoteBranch
- func (b *RemoteBranch) Delete() error
- func (b *RemoteBranch) Equals(otherRemoteBranch *RemoteBranch) bool
- func (b *RemoteBranch) GetFullName() string
- func (r *RemoteBranch) GetHeadCommit() (*Commit, error)
- func (b *RemoteBranch) GetName() string
- func (b *RemoteBranch) IsMergedTo(target *RemoteBranch) (bool, error)
- func (b *RemoteBranch) String() string
- type Repository
- func (r *Repository) Execute(c script.Command) (pr *script.ProcessResult, err error)
- func (r *Repository) GetBranch(name string) (*LocalBranch, error)
- func (r *Repository) GetBranches() ([]*LocalBranch, error)
- func (r *Repository) GetCurrentBranch() (*LocalBranch, error)
- func (r *Repository) GetCurrentCommit() (Commit, error)
- func (r *Repository) GetMainBranch() (*LocalBranch, error)
- func (r *Repository) GetPath() string
- func (r *Repository) GetRemote(name string) (*Remote, error)
- func (r *Repository) GetRemotes() ([]*Remote, error)
- func (r *Repository) HasBranch(name string) (bool, error)
- func (r *Repository) HasRemote(name string) (bool, error)
- func (r *Repository) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGitVersion ¶
func IsValidCommitHash ¶ added in v0.1.9
func MustGetGitVersion ¶
Types ¶
type Commit ¶
type Commit struct {
// contains filtered or unexported fields
}
func (*Commit) EqualsPatchId ¶ added in v0.1.9
func (*Commit) GetAuthorDateRelative ¶
func (*Commit) GetAuthorEmail ¶
func (*Commit) GetAuthorName ¶
func (*Commit) GetFullHash ¶ added in v0.1.1
func (*Commit) GetLocalBranches ¶ added in v0.1.2
func (c *Commit) GetLocalBranches() ([]*LocalBranch, error)
GetLocalBranches returns a list of all local branches containing this commit
func (*Commit) GetMessage ¶
func (*Commit) GetPatchId ¶ added in v0.1.9
func (*Commit) GetRemoteBranches ¶ added in v0.1.8
func (c *Commit) GetRemoteBranches(remote *Remote) ([]*RemoteBranch, error)
GetRemoteBranches returns a list of all branches on a given remote containing this commit
func (*Commit) GetShortHash ¶ added in v0.1.1
type LocalBranch ¶
type LocalBranch struct {
// contains filtered or unexported fields
}
func (*LocalBranch) Delete ¶
func (b *LocalBranch) Delete() error
func (*LocalBranch) Equals ¶
func (b *LocalBranch) Equals(otherLocalBranch *LocalBranch) bool
func (*LocalBranch) ForceDelete ¶ added in v0.1.9
func (b *LocalBranch) ForceDelete() error
func (*LocalBranch) GetCommitsByMessage ¶ added in v0.1.9
func (b *LocalBranch) GetCommitsByMessage(msg string) ([]*Commit, error)
func (*LocalBranch) GetFullName ¶
func (b *LocalBranch) GetFullName() string
func (*LocalBranch) GetHeadCommit ¶
func (b *LocalBranch) GetHeadCommit() (*Commit, error)
func (*LocalBranch) GetName ¶
func (b *LocalBranch) GetName() string
func (*LocalBranch) GetTrackingRemote ¶
func (b *LocalBranch) GetTrackingRemote(r *Remote) (*RemoteBranch, error)
func (*LocalBranch) IsMainBranch ¶
func (b *LocalBranch) IsMainBranch() (bool, error)
func (*LocalBranch) IsMergedTo ¶
func (b *LocalBranch) IsMergedTo(target Branch) (bool, error)
func (*LocalBranch) String ¶
func (b *LocalBranch) String() string
type Remote ¶
type Remote struct {
// contains filtered or unexported fields
}
func (*Remote) GetBranches ¶
func (r *Remote) GetBranches() ([]*RemoteBranch, error)
func (*Remote) GetMainBranch ¶ added in v0.1.4
func (r *Remote) GetMainBranch() (*RemoteBranch, error)
type RemoteBranch ¶
type RemoteBranch struct {
// contains filtered or unexported fields
}
func (*RemoteBranch) Delete ¶ added in v0.1.7
func (b *RemoteBranch) Delete() error
func (*RemoteBranch) Equals ¶ added in v0.1.6
func (b *RemoteBranch) Equals(otherRemoteBranch *RemoteBranch) bool
func (*RemoteBranch) GetFullName ¶
func (b *RemoteBranch) GetFullName() string
func (*RemoteBranch) GetHeadCommit ¶
func (r *RemoteBranch) GetHeadCommit() (*Commit, error)
func (*RemoteBranch) GetName ¶
func (b *RemoteBranch) GetName() string
func (*RemoteBranch) IsMergedTo ¶
func (b *RemoteBranch) IsMergedTo(target *RemoteBranch) (bool, error)
func (*RemoteBranch) String ¶
func (b *RemoteBranch) String() string
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func OpenRepository ¶
func OpenRepository(path string) (*Repository, error)
func (*Repository) Execute ¶
func (r *Repository) Execute(c script.Command) (pr *script.ProcessResult, err error)
func (*Repository) GetBranch ¶
func (r *Repository) GetBranch(name string) (*LocalBranch, error)
func (*Repository) GetBranches ¶
func (r *Repository) GetBranches() ([]*LocalBranch, error)
func (*Repository) GetCurrentBranch ¶
func (r *Repository) GetCurrentBranch() (*LocalBranch, error)
func (*Repository) GetCurrentCommit ¶
func (r *Repository) GetCurrentCommit() (Commit, error)
func (*Repository) GetMainBranch ¶
func (r *Repository) GetMainBranch() (*LocalBranch, error)
func (*Repository) GetPath ¶
func (r *Repository) GetPath() string
func (*Repository) GetRemotes ¶
func (r *Repository) GetRemotes() ([]*Remote, error)
func (*Repository) String ¶
func (r *Repository) String() string
Click to show internal directories.
Click to hide internal directories.