Documentation ¶
Index ¶
- Constants
- Variables
- func StripRemotePrefix(name string) string
- func ToSid(commitID string) string
- func Version() string
- func WorkingTreeRoot(path string) (string, error)
- type Branch
- type Branches
- type Commit
- type CommitDiff
- type Commits
- type DiffMode
- type FileDiff
- type Git
- type LinesDiff
- type SectionDiff
- type Status
- type Tag
Constants ¶
View Source
const ( UncommittedID = "0000000000000000000000000000000000000000" UncommittedSID = "000000" PartialLogCommitID = "ffffffffffffffffffffffffffffffffffffffff" )
Variables ¶
View Source
var ErrConflicts = errors.New("merge resulted in conflict(s)")
Functions ¶
func StripRemotePrefix ¶
func WorkingTreeRoot ¶
Types ¶
type Branch ¶
type Commit ¶
type CommitDiff ¶
type FileDiff ¶
type FileDiff struct { PathBefore string PathAfter string IsRenamed bool DiffMode DiffMode SectionDiffs []SectionDiff }
type Git ¶
type Git interface { RepoPath() string GetLog() (Commits, error) GetLogMax(maxCommitCount int) (Commits, error) GetStatus() (Status, error) GetBranches() (Branches, error) GetFiles(ref string) ([]string, error) InitRepo() error InitRepoBare() error Clone(uri, path string) error ConfigUser(name, email string) error IsIgnored(path string) bool CommitDiff(id string) (CommitDiff, error) FileDiff(path string) ([]CommitDiff, error) Checkout(name string) error Commit(message string) error Fetch() error PushBranch(name string) error CreateBranch(name string) error CreateBranchAt(name string, id string) error MergeBranch(name string) error MergeSquashBranch(name string) error DeleteRemoteBranch(name string) error DeleteLocalBranch(name string, isForced bool) error GetTags() ([]Tag, error) PullCurrentBranch() error PullBranch(name string) error GetKeyValue(key string) (string, error) SetKeyValue(key, value string) error PushKeyValue(key string) error PullKeyValue(key string) error UndoCommit(id string) error UncommitLastCommit() error UndoAllUncommittedChanges() error UndoUncommittedFileChanges(path string) error CleanWorkingFolder() error }
func NewWithCmd ¶
func NewWithCmd(cmd gitCommander) Git
type SectionDiff ¶
Click to show internal directories.
Click to hide internal directories.