git

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBranchReflogLines

func GetBranchReflogLines(name string, prettyFmt string) ([]string, error)

func GetGitReflogLines

func GetGitReflogLines(prettyFmt string) ([]string, error)

func ShowActive added in v0.5.0

func ShowActive()

func SliceContainsBranchCommitData

func SliceContainsBranchCommitData(slice []*BranchCheckoutInfo, info *BranchCheckoutInfo) bool

Types

type BranchActivity added in v0.5.0

type BranchActivity struct {
	Name           string
	IsRemote       bool
	CommitCount    int
	LatestCommit   string
	LatestCommitAt time.Time
}

BranchActivity represents a branch and its commit count in the last 48 hours

func GetActiveBranches added in v0.5.0

func GetActiveBranches(repoPath string) ([]BranchActivity, error)

GetActiveBranches returns a slice of BranchActivity sorted by commit count in descending order

type BranchCheckoutInfo

type BranchCheckoutInfo struct {
	BranchName   string
	RelativeTime string
	Timestamp    time.Time
}

func GetBranchInfoFromReflogLine

func GetBranchInfoFromReflogLine(pattern *regexp.Regexp, reflogLine string, minMatchCount int) *BranchCheckoutInfo

type BranchInfo

type BranchInfo struct {
	Name            string
	CheckoutCount   int
	CommitCount     int
	CheckoutHistory []*BranchCheckoutInfo
	CheckedOutLast  time.Time
	Score           float64
}

func (*BranchInfo) Update

func (b *BranchInfo) Update()

func (*BranchInfo) UpdateCheckoutCount

func (b *BranchInfo) UpdateCheckoutCount()

func (*BranchInfo) UpdateScore

func (b *BranchInfo) UpdateScore()

type RefLogItem

type RefLogItem struct {
	BranchName  string
	CommitHash  string
	AuthorName  string
	AuthorEmail string
	Timestamp   time.Time
	Action      string
	Message     string
}

func GetRefLogItemsForBranch

func GetRefLogItemsForBranch(branchName string) ([]*RefLogItem, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL