Documentation
¶
Overview ¶
Package internal defines shared diff model types used across the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiffHunk ¶
type DiffHunk struct {
Header string
// OldStartLine is the first line number in the old-file range from the hunk header.
OldStartLine int
// StartLine is the first line number in the new-file range from the hunk header.
StartLine int
Lines []DiffLine
}
DiffHunk stores one @@ block from a unified diff.
type DiffLine ¶
type DiffLine struct {
Type LineType
Content string
// OldLineNo is the source file line number for deleted or context lines.
OldLineNo int
// NewLineNo is the destination file line number for added or context lines.
NewLineNo int
}
DiffLine stores one rendered diff line without the +/- prefix.
type FileDiff ¶
type FileDiff struct {
Path string
Status FileStatus
Hunks []DiffHunk
AddCount int
DelCount int
IsBinary bool
}
FileDiff stores the parsed diff for one file.
type FileStatus ¶
type FileStatus int
FileStatus marks the kind of change for a file.
const ( // StatusModified means the file existed before and changed. StatusModified FileStatus = iota // StatusAdded means the file is new relative to baseline. StatusAdded // StatusDeleted means the file was removed relative to baseline. StatusDeleted // StatusBinary means the file changed but should not render textual hunks. StatusBinary )
Directories
¶
| Path | Synopsis |
|---|---|
|
Package git provides repository discovery and diff computation helpers.
|
Package git provides repository discovery and diff computation helpers. |
|
Package ui renders the diffpane Bubble Tea interface and its supporting views.
|
Package ui renders the diffpane Bubble Tea interface and its supporting views. |
|
Package watcher provides fsnotify-based file watching with debounce logic.
|
Package watcher provides fsnotify-based file watching with debounce logic. |
Click to show internal directories.
Click to hide internal directories.