Documentation
¶
Overview ¶
Package diff implements diff metadata parsing and merge logic.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetadataService ¶
MetadataService lists files changed between two commits.
func (*MetadataService) ListFiles ¶
func (s *MetadataService) ListFiles(ctx context.Context, cmp model.ResolvedCompare) ([]model.FileSummary, error)
ListFiles returns file summaries in the order emitted by git diff --name-status. It runs two git commands (--name-status -z and --numstat -z), parses the NUL-delimited output, and merges counts into the authoritative ordering.
type OversizedError ¶
OversizedError wraps ErrOversized with the measured byte size and line count so the UI can display them in the fallback message.
func (*OversizedError) Error ¶
func (e *OversizedError) Error() string
func (*OversizedError) Unwrap ¶
func (e *OversizedError) Unwrap() error
type PatchService ¶
PatchService loads and parses unified diffs for individual files.
func (*PatchService) LoadPatch ¶
func (s *PatchService) LoadPatch(ctx context.Context, cmp model.ResolvedCompare, filePath string, status model.FileStatus, ignoreWhitespace bool) (model.FilePatch, error)
LoadPatch runs git diff --patch for a single file and parses the result. For untracked files (status == StatusUntracked), it uses --no-index against /dev/null.