Documentation ¶
Index ¶
- Variables
- type Branch
- type Commit
- type Ignorer
- type MetaData
- type Repo
- func (r *Repo) BranchByName(name string) (*Branch, bool)
- func (r *Repo) CommitByID(id string) *Commit
- func (r *Repo) CurrentBranch() (*Branch, bool)
- func (r *Repo) Parent(commit *Commit, index int) (*Commit, bool)
- func (r Repo) SearchCommits(searchText string) []*Commit
- func (r *Repo) TryGetCommitByID(id string) (*Commit, bool)
- type RepoChange
- type RepoService
- type Status
- type Tag
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultBranchPriority = []string{"origin/main", "main", "origin/master", "master"}
Default branch priority determines parent child branch relations.
Functions ¶
This section is empty.
Types ¶
type Branch ¶
type Branch struct { Name string DisplayName string TipID string BottomID string ParentBranch *Branch IsRemote bool RemoteName string LocalName string IsCurrent bool IsGitBranch bool IsAmbiguousBranch bool IsNamedBranch bool IsSetAsParent bool AmbiguousTipId string AmbiguousBranches []*Branch }
func (*Branch) GetAncestors ¶
func (*Branch) GetAncestorsAndSelf ¶
func (*Branch) IsAncestorBranch ¶
type Commit ¶
type Commit struct { Id string Sid string Subject string Message string Author string AuthorTime time.Time ParentIDs []string IsCurrent bool ChildIDs []string FirstParent *Commit MergeParent *Commit Children []*Commit MergeChildren []*Commit Branch *Branch Branches []*Branch BranchTipNames []string IsAmbiguous bool IsAmbiguousTip bool // contains filtered or unexported fields }
type Repo ¶
type Repo struct { Commits []*Commit Branches []*Branch Status Status Tags []Tag RepoPath string MetaData MetaData // contains filtered or unexported fields }
func (*Repo) CommitByID ¶
func (*Repo) CurrentBranch ¶
func (Repo) SearchCommits ¶
type RepoChange ¶
type RepoService ¶
type RepoService interface { Git() git.Git RepoChanges() chan RepoChange RepoPath() string TriggerManualRefresh() StartMonitor(ctx context.Context) GetCommitDiff(id string) (git.CommitDiff, error) GetFileDiff(path string) ([]git.CommitDiff, error) GetFiles(ref string) ([]string, error) SwitchToBranch(name string) error Commit(commit string) error PushBranch(name string) error CreateBranch(name string, parentBranch *Branch) error MergeBranch(name string) error DeleteRemoteBranch(name string) error DeleteLocalBranch(name string, isForced bool) error PullCurrentBranch() error PullBranch(name string) error GetFreshRepo() (Repo, error) SetAsParentBranch(b *Branch, pb *Branch) error UnsetAsParentBranch(name string) error UndoCommit(id string) error UncommitLastCommit() error UndoAllUncommittedChanges() error UndoUncommittedFileChanges(path string) error CleanWorkingFolder() error }
func NewRepoService ¶
func NewRepoService(rootPath string) RepoService
Click to show internal directories.
Click to hide internal directories.