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

Function NewCommitProvider

internal/diff/git.go:74–81  ·  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

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

Calls

no outgoing calls