Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Diff ¶
Diff executes `git diff` and returns the raw command output. Callers are responsible for parsing or rendering the returned bytes.
func GetFileDiff ¶
GetFileDiff returns the unified diff for a specific file. contextLines specifies how many context lines to show (0 for default, -1 for full file) mode specifies which changes to show (staged, unstaged, or all)
Types ¶
type FileStat ¶
type FileStat struct {
Path string
Status FileStatus
Additions int
Deletions int
}
FileStat contains metadata about a changed file.
type FileStatus ¶
type FileStatus int
FileStatus represents the status of a modified file.
const ( StatusModified FileStatus = iota StatusAdded StatusDeleted StatusRenamed StatusUntracked StatusUnknown )
Click to show internal directories.
Click to hide internal directories.