Documentation
¶
Overview ¶
Package git provides utilities to extract Git metadata for files and lines.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlameInfo ¶
type BlameInfo struct {
CommitHash string // Commit SHA
Author string // Author name
Email string // Author email
Timestamp time.Time
Summary string // Commit message summary
Line int // Line number (1-based)
}
BlameInfo holds blame metadata for a specific line in a file.
type CommitMeta ¶
type CommitMeta struct {
Hash string // Commit SHA
Author string // Author name
Email string // Author email
Timestamp time.Time // Commit date
Message string // Commit message
}
CommitMeta represents metadata about a Git commit.
func LatestCommit ¶
func LatestCommit() (*CommitMeta, error)
LatestCommit returns metadata for the latest commit in the repository.
type GitMetadata ¶ added in v0.2.1
type GitMetadata struct {
RepoRoot string // Repository root path
Branch string // Current branch name
CommitHash string // Full commit hash
CommitShort string // Short commit hash (first 8 chars)
Author string // Author name
Email string // Author email
Message string // Commit message
Timestamp time.Time // Commit timestamp
IsDirty bool // Whether working directory has uncommitted changes
}
GitMetadata represents complete Git repository information.
func GetGitMetadata ¶ added in v0.2.1
func GetGitMetadata() (*GitMetadata, error)
GetGitMetadata returns complete Git repository metadata.
Click to show internal directories.
Click to hide internal directories.