MCPcopy Create free account
hub / github.com/alibaba/open-code-review / GetDiff

Method GetDiff

internal/diff/git.go:207–213  ·  view source on GitHub ↗

GetDiff returns the changes available to a review as parsed model.Diff structs.

(ctx context.Context)

Source from the content-addressed store, hash-verified

205
206// GetDiff returns the changes available to a review as parsed model.Diff structs.
207func (p *Provider) GetDiff(ctx context.Context) ([]model.Diff, error) {
208 set, err := p.GetDiffSet(ctx)
209 if err != nil {
210 return nil, err
211 }
212 return set.Included, nil
213}
214
215// GetDiffSet returns both reviewable diffs and those excluded by the provider's
216// built-in directory rules. It preserves GetDiff's filtering behavior while

Calls 1

GetDiffSetMethod · 0.95