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

Function NewCommitProvider

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

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

Calls

no outgoing calls