Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BranchStats ¶
type BranchStats struct {
BranchChanges Stats // Current branch vs base (main or remote)
Commits CommitHistory // Commits unique to branch
BaseBranch string // "main" or "origin/feature"
CurrentBranch string // Current branch name
CompareMode string // "vs main" or "vs remote"
}
BranchStats represents statistics for current branch vs base branch.
func ComputeBranchStats ¶
func ComputeBranchStats(baseBranch string, compareRemote bool) (*BranchStats, error)
ComputeBranchStats computes statistics for current branch vs base branch. baseBranch: branch to compare against ("main", "master", or remote tracking branch) compareRemote: if true, compare with remote tracking branch instead of main
type CommitHistory ¶
type CommitHistory struct {
Commits []CommitInfo // List of commits
TotalCommits int // Total number of commits
DisplayLimit int // How many commits to display (10-20)
}
CommitHistory represents a list of recent commits.
type CommitInfo ¶
type CommitInfo struct {
Hash string // Short hash (7 chars)
Message string // First line of commit message
Author string // Author name
DateStr string // Relative date string (e.g., "2 hours ago")
Additions int // Total lines added in commit
Deletions int // Total lines deleted in commit
}
CommitInfo represents a single commit with statistics.
type Stats ¶
type Stats struct {
TotalAdditions int // Sum of all additions
TotalDeletions int // Sum of all deletions
TotalFiles int // Number of files changed
FileStats []git.FileStat // Individual file statistics
MaxChanges int // Max changes in any single file (for bar scaling)
}
Stats represents aggregated statistics for a set of changes.
func ComputeStats ¶
ComputeStats aggregates statistics from a list of files.
Click to show internal directories.
Click to hide internal directories.