MCPcopy Index your code
hub / github.com/gogs/gogs / RepoDiff

Function RepoDiff

internal/gitutil/diff.go:185–191  ·  view source on GitHub ↗

RepoDiff parses the diff on given revisions of given repository.

(repo *git.Repository, rev string, maxFiles, maxFileLines, maxLineChars int, opts ...git.DiffOptions)

Source from the content-addressed store, hash-verified

183
184// RepoDiff parses the diff on given revisions of given repository.
185func RepoDiff(repo *git.Repository, rev string, maxFiles, maxFileLines, maxLineChars int, opts ...git.DiffOptions) (*Diff, error) {
186 diff, err := repo.Diff(rev, maxFiles, maxFileLines, maxLineChars, opts...)
187 if err != nil {
188 return nil, errors.Newf("get diff: %v", err)
189 }
190 return NewDiff(diff), nil
191}

Callers 4

ViewPullFilesFunction · 0.92
PrepareCompareDiffFunction · 0.92
DiffFunction · 0.92
CompareDiffFunction · 0.92

Calls 1

NewDiffFunction · 0.85

Tested by

no test coverage detected