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

Function NewCommitProvider

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

109
110// NewCommitProvider creates a Provider for commit mode: show changes introduced by a single commit.
111func NewCommitProvider(repoDir, commit string, runner *gitcmd.Runner) *Provider {
112 return &Provider{
113 repoDir: repoDir,
114 mode: ModeCommit,
115 commit: commit,
116 runner: runner,
117 }
118}
119
120// NewWorkspaceProvider creates a Provider for workspace mode (current uncommitted changes).
121func NewWorkspaceProvider(repoDir string, runner *gitcmd.Runner) *Provider {

Calls

no outgoing calls