Documentation ¶
Index ¶
- type Branch
- func (b *Branch) Description() string
- func (b *Branch) HasCommitsToPull() bool
- func (b *Branch) HasCommitsToPush() bool
- func (b *Branch) ID() string
- func (b *Branch) IsRealBranch() bool
- func (b *Branch) IsTrackingRemote() bool
- func (b *Branch) MatchesUpstream() bool
- func (b *Branch) RefName() string
- type Commit
- type CommitFile
- type File
- func (f *File) Description() string
- func (f *File) GetHasStagedChanges() bool
- func (f *File) GetHasUnstagedChanges() bool
- func (f *File) GetIsTracked() bool
- func (f *File) GetPath() string
- func (f *File) ID() string
- func (f *File) IsRename() bool
- func (f *File) IsSubmodule(configs []*SubmoduleConfig) bool
- func (f *File) Matches(f2 *File) bool
- func (f *File) Names() []string
- func (f *File) SubmoduleConfig(configs []*SubmoduleConfig) *SubmoduleConfig
- type IFile
- type Remote
- type RemoteBranch
- type StashEntry
- type SubmoduleConfig
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Branch ¶
type Branch struct { Name string // the displayname is something like '(HEAD detached at 123asdf)', whereas in that case the name would be '123asdf' DisplayName string Recency string Pushables string Pullables string UpstreamName string Head bool }
Branch : A git branch duplicating this for now
func (*Branch) Description ¶
func (*Branch) HasCommitsToPull ¶ added in v0.30.1
func (*Branch) HasCommitsToPush ¶ added in v0.30.1
func (*Branch) IsRealBranch ¶ added in v0.30.1
for when we're in a detached head state
func (*Branch) IsTrackingRemote ¶ added in v0.30.1
this method does not consider the case where the git config states that a branch is tracking the config. The Pullables value here is based on whether or not we saw an upstream when doing `git branch`
func (*Branch) MatchesUpstream ¶ added in v0.30.1
type Commit ¶
type Commit struct { Sha string Name string Status string // one of "unpushed", "pushed", "merged", "rebasing" or "selected" Action string // one of "", "pick", "edit", "squash", "reword", "drop", "fixup" Tags []string ExtraInfo string // something like 'HEAD -> master, tag: v0.15.2' Author string UnixTimestamp int64 // SHAs of parent commits (will be multiple if it's a merge commit) Parents []string }
Commit : A git commit
func (*Commit) Description ¶
type CommitFile ¶
type CommitFile struct { // TODO: rename this to Path Name string ChangeStatus string // e.g. 'A' for added or 'M' for modified. This is based on the result from git diff --name-status }
CommitFile : A git commit file
func (*CommitFile) Description ¶
func (f *CommitFile) Description() string
func (*CommitFile) ID ¶
func (f *CommitFile) ID() string
type File ¶
type File struct { Name string PreviousName string HasStagedChanges bool HasUnstagedChanges bool Tracked bool Added bool Deleted bool HasMergeConflicts bool HasInlineMergeConflicts bool DisplayString string Type string // one of 'file', 'directory', and 'other' ShortStatus string // e.g. 'AD', ' A', 'M ', '??' }
File : A file from git status duplicating this for now
func (*File) Description ¶
func (*File) GetHasStagedChanges ¶ added in v0.27.1
func (*File) GetHasUnstagedChanges ¶ added in v0.27.1
func (*File) GetIsTracked ¶ added in v0.27.1
func (*File) IsSubmodule ¶
func (f *File) IsSubmodule(configs []*SubmoduleConfig) bool
func (*File) Matches ¶
returns true if the file names are the same or if a a file rename includes the filename of the other
func (*File) Names ¶
Names returns an array containing just the filename, or in the case of a rename, the after filename and the before filename
func (*File) SubmoduleConfig ¶
func (f *File) SubmoduleConfig(configs []*SubmoduleConfig) *SubmoduleConfig
type IFile ¶ added in v0.27.1
type IFile interface { GetHasUnstagedChanges() bool GetHasStagedChanges() bool GetIsTracked() bool GetPath() string }
sometimes we need to deal with either a node (which contains a file) or an actual file
type Remote ¶
type Remote struct { Name string Urls []string Branches []*RemoteBranch }
Remote : A git remote
func (*Remote) Description ¶
type RemoteBranch ¶
Remote Branch : A git remote branch
func (*RemoteBranch) Description ¶
func (r *RemoteBranch) Description() string
func (*RemoteBranch) FullName ¶
func (r *RemoteBranch) FullName() string
func (*RemoteBranch) ID ¶
func (r *RemoteBranch) ID() string
func (*RemoteBranch) RefName ¶
func (r *RemoteBranch) RefName() string
type StashEntry ¶
StashEntry : A git stash entry
func (*StashEntry) Description ¶
func (s *StashEntry) Description() string
func (*StashEntry) ID ¶
func (s *StashEntry) ID() string
func (*StashEntry) RefName ¶
func (s *StashEntry) RefName() string
type SubmoduleConfig ¶
func (*SubmoduleConfig) Description ¶
func (r *SubmoduleConfig) Description() string
func (*SubmoduleConfig) ID ¶
func (r *SubmoduleConfig) ID() string
func (*SubmoduleConfig) RefName ¶
func (r *SubmoduleConfig) RefName() string