Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BranchNameRegex = regexp.MustCompile(`spr/([a-zA-Z0-9_\-/\.]+)/([a-f0-9]{8})$`)
Functions ¶
func BranchNameFromCommit ¶ added in v0.12.1
func GetLocalBranchName ¶ added in v0.12.1
func GetLocalBranchName(gitcmd GitInterface) string
GetLocalBranchName returns the current local git branch
Types ¶
type Commit ¶
type Commit struct { // CommitID is a long lasting id describing the commit. // The CommitID is generated and added to the end of the commit message on the initial commit. // The CommitID remains the same when a commit is amended. CommitID string // CommitHash is the git commit hash, this gets updated everytime the commit is amended. CommitHash string // Subject is the subject of the commit message. Subject string // Body is the body of the commit message. Body string // WIP is true if the commit is still work in progress. WIP bool }
Commit has all the git commit info
func GetLocalCommitStack ¶ added in v0.12.1
func GetLocalCommitStack(cfg *config.Config, gitcmd GitInterface) []Commit
GetLocalCommitStack returns a list of unmerged commits
the list is ordered with the bottom commit in the stack first
func GetLocalTopCommit ¶ added in v0.12.1
func GetLocalTopCommit(cfg *config.Config, gitcmd GitInterface) *Commit
GetLocalTopCommit returns the top unmerged commit in the stack
return nil if there are no unmerged commits in the stack
Click to show internal directories.
Click to hide internal directories.