Documentation
¶
Overview ¶
Package diff implements `gitmap diff LEFT RIGHT`: a read-only preview of what `gitmap merge-both / merge-left / merge-right` would change. No files are written, no commits, no pushes.
Spec: companion to spec/01-app/97-move-and-merge.md
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Endpoint ¶
Endpoint is a fully classified LEFT or RIGHT argument.
`gitmap diff` only supports local folders. URL endpoints are rejected with a hint to clone them first; this keeps `diff` strictly read-only and side-effect-free.
func ResolveEndpoint ¶
ResolveEndpoint validates that raw points at an existing folder and returns its absolute path.
type Entry ¶
type Entry struct {
RelPath string `json:"path"`
Kind EntryKind `json:"-"`
KindLabel string `json:"kind"`
LeftSize int64 `json:"left_size,omitempty"`
RightSize int64 `json:"right_size,omitempty"`
LeftMTime int64 `json:"left_mtime,omitempty"`
RightMTime int64 `json:"right_mtime,omitempty"`
}
Entry is one path classified for the diff report.
type PrintOptions ¶
PrintOptions controls the human-readable report layout.
type Summary ¶
type Summary struct {
MissingLeft int `json:"missing_left"`
MissingRight int `json:"missing_right"`
Conflicts int `json:"conflicts"`
Identical int `json:"identical"`
}
Summary is the per-kind tally returned alongside the entries.
func SummaryFor ¶
SummaryFor counts kinds across an Entry slice.
type WalkOptions ¶
WalkOptions controls which files participate in the diff.