MCPcopy Index your code
hub / github.com/go-git/go-git / Do

Function Do

utils/diff/diff.go:20–23  ·  view source on GitHub ↗

Do computes the (line oriented) modifications needed to turn the src string into the dst string. The underlying algorithm is Meyers, its complexity is O(N*d) where N is min(lines(src), lines(dst)) and d is the size of the diff.

(src, dst string)

Source from the content-addressed store, hash-verified

18// its complexity is O(N*d) where N is min(lines(src), lines(dst)) and d
19// is the size of the diff.
20func Do(src, dst string) (diffs []diffmatchpatch.Diff) {
21 // the default timeout is time.Second which may be too small under heavy load
22 return DoWithTimeout(src, dst, time.Hour)
23}
24
25// DoWithTimeout computes the (line oriented) modifications needed to turn the src
26// string into the dst string. The `timeout` argument specifies the maximum

Callers 4

addBlamesMethod · 0.92
TestAllMethod · 0.92
TestDoMethod · 0.92
filePatchWithContextFunction · 0.92

Calls 1

DoWithTimeoutFunction · 0.85

Tested by 2

TestAllMethod · 0.74
TestDoMethod · 0.74