MCPcopy
hub / github.com/go-git/go-git / appendPathLines

Method appendPathLines

plumbing/format/diff/unified_encoder.go:165–175  ·  view source on GitHub ↗
(lines []string, fromPath, toPath string, isBinary bool)

Source from the content-addressed store, hash-verified

163}
164
165func (e *UnifiedEncoder) appendPathLines(lines []string, fromPath, toPath string, isBinary bool) []string {
166 if isBinary {
167 return append(lines,
168 fmt.Sprintf("Binary files %s and %s differ", fromPath, toPath),
169 )
170 }
171 return append(lines,
172 fmt.Sprintf("--- %s", fromPath),
173 fmt.Sprintf("+++ %s", toPath),
174 )
175}
176
177type hunksGenerator struct {
178 fromLine, toLine int

Callers 1

writeFilePatchHeaderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected