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

Function NewCommitProvider

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

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

Calls

no outgoing calls