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

Function NewCommitProvider

internal/diff/git.go:77–84  ·  view source on GitHub ↗

NewCommitProvider creates a Provider for commit mode: show changes introduced by a single commit.

(repoDir, commit string, runner *gitcmd.Runner)

Source from the content-addressed store, hash-verified

75
76// NewCommitProvider creates a Provider for commit mode: show changes introduced by a single commit.
77func NewCommitProvider(repoDir, commit string, runner *gitcmd.Runner) *Provider {
78 return &Provider{
79 repoDir: repoDir,
80 mode: ModeCommit,
81 commit: commit,
82 runner: runner,
83 }
84}
85
86// NewWorkspaceProvider creates a Provider for workspace mode (current uncommitted changes).
87func NewWorkspaceProvider(repoDir string, runner *gitcmd.Runner) *Provider {

Calls

no outgoing calls