Documentation
¶
Overview ¶
Package gitdiff produces the live diff for a session's working directory by shelling out to git. It never modifies the repository.
Index ¶
Constants ¶
const MaxPatchBytes = 200 << 10
MaxPatchBytes bounds each file's patch in the response.
Variables ¶
var ErrNotARepo = errors.New("not a git repository")
ErrNotARepo means cwd is not inside a git work tree (→ HTTP 409).
Functions ¶
This section is empty.
Types ¶
type FileDiff ¶
type FileDiff struct {
Path string `json:"path"`
Status string `json:"status"` // modified | added | deleted | renamed | untracked
Additions int `json:"additions"`
Deletions int `json:"deletions"`
Patch string `json:"patch,omitempty"`
Binary bool `json:"binary,omitempty"`
}
FileDiff is one changed file.