Documentation
¶
Overview ¶
Package patch implements the frozen CEM 0.1 bounded unified-diff parser specified by interop/cem-0.1/ALGORITHMS.md.
Index ¶
Constants ¶
View Source
const ( MaxPatchBytes = 8 << 20 MaxLFRecords = 262144 )
Frozen bounds.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BodyLine ¶
BodyLine is one hunk body line. Payload excludes the prefix byte and retains its trailing LF; StripLFOld/StripLFNew record a following no-final-newline marker for the respective reconstructed side.
func (BodyLine) NewPayload ¶
NewPayload returns one body line's new-side reconstructed bytes.
func (BodyLine) OldPayload ¶
OldPayload returns one body line's old-side reconstructed bytes.
type Group ¶
type Group struct {
Kind GroupKind
OldPath *string
NewPath *string
Mode string // bound tree mode for creates and deletes
Hunks []*Hunk
}
Group is one contiguous file group.
Click to show internal directories.
Click to hide internal directories.