MCPcopy Create free account
hub / github.com/go-git/go-git / Src

Function Src

utils/diff/diff.go:53–61  ·  view source on GitHub ↗

Src computes and returns the source text

(diffs []diffmatchpatch.Diff)

Source from the content-addressed store, hash-verified

51
52// Src computes and returns the source text
53func Src(diffs []diffmatchpatch.Diff) string {
54 var text bytes.Buffer
55 for _, d := range diffs {
56 if d.Type != diffmatchpatch.DiffInsert {
57 text.WriteString(d.Text)
58 }
59 }
60 return text.String()
61}

Callers 1

TestAllMethod · 0.92

Calls 1

StringMethod · 0.65

Tested by 1

TestAllMethod · 0.74