Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGitRoot ¶
GetGitRoot is exported for use by other packages
Types ¶
type DiffResult ¶
type DiffResult struct {
// RawDiff is the raw git diff output
RawDiff string
// ModifiedFiles maps file paths to their full content
ModifiedFiles map[string]string
// FilePaths is a list of all modified file paths
FilePaths []string
}
DiffResult contains the extracted diff and file contents
func GetDiff ¶
func GetDiff(staged bool, baseBranch string) (*DiffResult, error)
GetDiff extracts the git diff and reads modified file contents If baseBranch is provided, compares against that branch/commit If staged is true, compares staged changes against HEAD Otherwise, compares working directory against HEAD
Click to show internal directories.
Click to hide internal directories.